Skip to content

Commit

Permalink
Add 'explicit' qualifiers to single-arguments ctors
Browse files Browse the repository at this point in the history
Just noticed that some single-arg ctors in the codebase missed the explicit qualifier.

BUG=
TBR=armansito

Review URL: https://codereview.chromium.org/1148943005

Cr-Commit-Position: refs/heads/master@{#331595}
  • Loading branch information
primiano authored and Commit bot committed May 27, 2015
1 parent a37f59b commit be0bb6d
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion android_webview/browser/aw_printing_message_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace android_webview {
// renderer process on the IPC thread.
class AwPrintingMessageFilter : public content::BrowserMessageFilter {
public:
AwPrintingMessageFilter(int render_process_id);
explicit AwPrintingMessageFilter(int render_process_id);

// content::BrowserMessageFilter methods.
void OverrideThreadForMessage(const IPC::Message& message,
Expand Down
2 changes: 1 addition & 1 deletion android_webview/browser/scoped_app_gl_state_restore.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ScopedAppGLStateRestore {
MODE_RESOURCE_MANAGEMENT,
};

ScopedAppGLStateRestore(CallMode mode);
explicit ScopedAppGLStateRestore(CallMode mode);
~ScopedAppGLStateRestore();

bool stencil_enabled() const;
Expand Down
2 changes: 1 addition & 1 deletion components/cloud_devices/common/printer_description.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ struct Media {
struct Interval {
Interval();
Interval(int32 start, int32 end);
Interval(int32 start);
explicit Interval(int32 start);

bool operator==(const Interval& other) const;
bool operator!=(const Interval& other) const { return !(*this == other); }
Expand Down
2 changes: 1 addition & 1 deletion components/invalidation/invalidation_service_android.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class InvalidationServiceAndroid
: public base::NonThreadSafe,
public InvalidationService {
public:
InvalidationServiceAndroid(jobject context);
explicit InvalidationServiceAndroid(jobject context);
~InvalidationServiceAndroid() override;

// InvalidationService implementation.
Expand Down
2 changes: 1 addition & 1 deletion content/browser/devtools/worker_devtools_agent_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class WorkerDevToolsAgentHost : public DevToolsAgentHostImpl,
bool IsTerminated();

protected:
WorkerDevToolsAgentHost(WorkerId worker_id);
explicit WorkerDevToolsAgentHost(WorkerId worker_id);
~WorkerDevToolsAgentHost() override;

enum WorkerState {
Expand Down
2 changes: 1 addition & 1 deletion content/browser/geofencing/mock_geofencing_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace content {
// will behave as if the platform does not support geofencing.
class MockGeofencingService : public GeofencingService {
public:
MockGeofencingService(bool service_available);
explicit MockGeofencingService(bool service_available);
~MockGeofencingService() override;

void SetMockPosition(double latitude, double longitude);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CONTENT_EXPORT SyntheticSmoothMoveGestureParams {
// to compensate for the touch slop.
class CONTENT_EXPORT SyntheticSmoothMoveGesture : public SyntheticGesture {
public:
SyntheticSmoothMoveGesture(SyntheticSmoothMoveGestureParams params);
explicit SyntheticSmoothMoveGesture(SyntheticSmoothMoveGestureParams params);
~SyntheticSmoothMoveGesture() override;

// SyntheticGesture implementation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CONTENT_EXPORT LegacyRenderWidgetHostHWND
void OnFinalMessage(HWND hwnd) override;

private:
LegacyRenderWidgetHostHWND(HWND parent);
explicit LegacyRenderWidgetHostHWND(HWND parent);
~LegacyRenderWidgetHostHWND() override;

bool Init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace content {
class PeerConnectionTrackerHost : public BrowserMessageFilter,
public base::PowerObserver {
public:
PeerConnectionTrackerHost(int render_process_id);
explicit PeerConnectionTrackerHost(int render_process_id);

// content::BrowserMessageFilter override.
bool OnMessageReceived(const IPC::Message& message) override;
Expand Down
2 changes: 1 addition & 1 deletion content/common/gpu/media/vt_video_decode_accelerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class VTVideoDecodeAccelerator : public media::VideoDecodeAccelerator {
};

struct Frame {
Frame(int32_t bitstream_id);
explicit Frame(int32_t bitstream_id);
~Frame();

// ID of the bitstream buffer this Frame will be decoded from.
Expand Down
2 changes: 1 addition & 1 deletion content/public/browser/background_tracing_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct CONTENT_EXPORT BackgroundTracingConfig {
base::DictionaryValue* dict);

protected:
BackgroundTracingConfig(Mode mode);
explicit BackgroundTracingConfig(Mode mode);
};

} // namespace content
Expand Down
2 changes: 1 addition & 1 deletion device/bluetooth/bluetooth_advertisement.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothAdvertisement
// Structure that holds the data for an advertisement.
class DEVICE_BLUETOOTH_EXPORT Data {
public:
Data(AdvertisementType type);
explicit Data(AdvertisementType type);
~Data();

AdvertisementType type() { return type_; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ typedef sdk_util::ScopedRef<PipeEventEmitter> ScopedPipeEventEmitter;

class PipeEventEmitter : public StreamEventEmitter {
public:
PipeEventEmitter(size_t size);
explicit PipeEventEmitter(size_t size);

Error Read_Locked(char* data, size_t len, int* out_bytes);
Error Write_Locked(const char* data, size_t len, int* out_bytes);
Expand Down
2 changes: 1 addition & 1 deletion net/base/chunked_upload_data_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class IOBuffer;
// seekable data, due to this buffering behavior.
class NET_EXPORT ChunkedUploadDataStream : public UploadDataStream {
public:
ChunkedUploadDataStream(int64 identifier);
explicit ChunkedUploadDataStream(int64 identifier);

~ChunkedUploadDataStream() override;

Expand Down
2 changes: 1 addition & 1 deletion net/base/upload_file_element_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class NET_EXPORT UploadFileElementReader : public UploadElementReader {
// Sets an value to override the result for GetContentLength().
// Used for tests.
struct NET_EXPORT_PRIVATE ScopedOverridingContentLengthForTests {
ScopedOverridingContentLengthForTests(uint64 value);
explicit ScopedOverridingContentLengthForTests(uint64 value);
~ScopedOverridingContentLengthForTests();
};

Expand Down
2 changes: 1 addition & 1 deletion net/filter/gzip_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class GZipFilter : public Filter {
static const int kGZipFooterSize = 8;

// Only to be instantiated by Filter::Factory.
GZipFilter(FilterType type);
explicit GZipFilter(FilterType type);
friend class Filter;

// Parses and verifies the GZip header.
Expand Down
2 changes: 1 addition & 1 deletion ppapi/cpp/view.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class View : public Resource {

/// Creates a View resource, taking and holding an additional reference to
/// the given resource handle.
View(PP_Resource view_resource);
explicit View(PP_Resource view_resource);

/// GetRect() retrieves the rectangle of the module instance associated
/// with a view changed notification relative to the upper-left of the browser
Expand Down
2 changes: 1 addition & 1 deletion remoting/host/audio_silence_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AudioSilenceDetector {
public:
// |threshold| is used to specify maximum absolute sample value that should
// still be considered as silence.
AudioSilenceDetector(int threshold);
explicit AudioSilenceDetector(int threshold);
~AudioSilenceDetector();

void Reset(int sampling_rate, int channels);
Expand Down
2 changes: 1 addition & 1 deletion ui/ozone/common/display_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DisplaySnapshot;
// find a display with |display_id| in std:: containers (ie: std::vector).
class FindDisplayById {
public:
FindDisplayById(int64_t display_id);
explicit FindDisplayById(int64_t display_id);

bool operator()(const DisplaySnapshot_Params& display) const;

Expand Down

0 comments on commit be0bb6d

Please sign in to comment.