diff options
Diffstat (limited to 'chrome/browser/extensions/api')
243 files changed, 2360 insertions, 2510 deletions
diff --git a/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h b/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h index 7e3ddd0..f09c5c7 100644 --- a/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h +++ b/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h @@ -26,12 +26,12 @@ class ActivityLogAPI : public BrowserContextKeyedAPI, public EventRouter::Observer { public: explicit ActivityLogAPI(content::BrowserContext* context); - virtual ~ActivityLogAPI(); + ~ActivityLogAPI() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<ActivityLogAPI>* GetFactoryInstance(); - virtual void Shutdown() override; + void Shutdown() override; // Lookup whether the extension ID is whitelisted. static bool IsExtensionWhitelisted(const std::string& extension_id); @@ -42,12 +42,12 @@ class ActivityLogAPI : public BrowserContextKeyedAPI, // ActivityLog::Observer // We pass this along to activityLogPrivate.onExtensionActivity. - virtual void OnExtensionActivity(scoped_refptr<Action> activity) override; + void OnExtensionActivity(scoped_refptr<Action> activity) override; // EventRouter::Observer // We only keep track of OnExtensionActivity if we have any listeners. - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; content::BrowserContext* browser_context_; ActivityLog* activity_log_; @@ -68,10 +68,10 @@ class ActivityLogPrivateGetExtensionActivitiesFunction ACTIVITYLOGPRIVATE_GETEXTENSIONACTIVITIES) protected: - virtual ~ActivityLogPrivateGetExtensionActivitiesFunction() {} + ~ActivityLogPrivateGetExtensionActivitiesFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnLookupCompleted( @@ -86,10 +86,10 @@ class ActivityLogPrivateDeleteActivitiesFunction ACTIVITYLOGPRIVATE_DELETEACTIVITIES) protected: - virtual ~ActivityLogPrivateDeleteActivitiesFunction() {} + ~ActivityLogPrivateDeleteActivitiesFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; // The implementation of activityLogPrivate.deleteDatabase @@ -100,10 +100,10 @@ class ActivityLogPrivateDeleteDatabaseFunction ACTIVITYLOGPRIVATE_DELETEDATABASE) protected: - virtual ~ActivityLogPrivateDeleteDatabaseFunction() {} + ~ActivityLogPrivateDeleteDatabaseFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; // The implementation of activityLogPrivate.deleteUrls @@ -114,10 +114,10 @@ class ActivityLogPrivateDeleteUrlsFunction ACTIVITYLOGPRIVATE_DELETEURLS) protected: - virtual ~ActivityLogPrivateDeleteUrlsFunction() {} + ~ActivityLogPrivateDeleteUrlsFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/activity_log_private/activity_log_private_apitest.cc b/chrome/browser/extensions/api/activity_log_private/activity_log_private_apitest.cc index 80cdf14..7196ddb 100644 --- a/chrome/browser/extensions/api/activity_log_private/activity_log_private_apitest.cc +++ b/chrome/browser/extensions/api/activity_log_private/activity_log_private_apitest.cc @@ -28,7 +28,7 @@ class ActivityLogApiTest : public ExtensionApiTest { *CommandLine::ForCurrentProcess() = saved_cmdline_; } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); saved_cmdline_ = *CommandLine::ForCurrentProcess(); command_line->AppendSwitch(switches::kEnableExtensionActivityLogging); diff --git a/chrome/browser/extensions/api/alarms/alarm_manager.cc b/chrome/browser/extensions/api/alarms/alarm_manager.cc index 98705a8..bf688fc 100644 --- a/chrome/browser/extensions/api/alarms/alarm_manager.cc +++ b/chrome/browser/extensions/api/alarms/alarm_manager.cc @@ -39,10 +39,9 @@ class DefaultAlarmDelegate : public AlarmManager::Delegate { public: explicit DefaultAlarmDelegate(content::BrowserContext* context) : browser_context_(context) {} - virtual ~DefaultAlarmDelegate() {} + ~DefaultAlarmDelegate() override {} - virtual void OnAlarm(const std::string& extension_id, - const Alarm& alarm) override { + void OnAlarm(const std::string& extension_id, const Alarm& alarm) override { scoped_ptr<base::ListValue> args(new base::ListValue()); args->Append(alarm.js_alarm->ToValue().release()); scoped_ptr<Event> event(new Event(alarms::OnAlarm::kEventName, diff --git a/chrome/browser/extensions/api/alarms/alarm_manager.h b/chrome/browser/extensions/api/alarms/alarm_manager.h index a0c9711..8df88ca 100644 --- a/chrome/browser/extensions/api/alarms/alarm_manager.h +++ b/chrome/browser/extensions/api/alarms/alarm_manager.h @@ -68,7 +68,7 @@ class AlarmManager : public BrowserContextKeyedAPI, }; explicit AlarmManager(content::BrowserContext* context); - virtual ~AlarmManager(); + ~AlarmManager() override; // Override the default delegate. Callee assumes onwership. Used for testing. void set_delegate(Delegate* delegate) { delegate_.reset(delegate); } @@ -202,12 +202,11 @@ class AlarmManager : public BrowserContextKeyedAPI, void RunWhenReady(const std::string& extension_id, const ReadyAction& action); // ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const Extension* extension, + extensions::UninstallReason reason) override; // BrowserContextKeyedAPI implementation. static const char* service_name() { diff --git a/chrome/browser/extensions/api/alarms/alarms_api.h b/chrome/browser/extensions/api/alarms/alarms_api.h index 20e68d0..eb65036 100644 --- a/chrome/browser/extensions/api/alarms/alarms_api.h +++ b/chrome/browser/extensions/api/alarms/alarms_api.h @@ -24,10 +24,10 @@ class AlarmsCreateFunction : public ChromeAsyncExtensionFunction { // of |clock|. Used for testing. explicit AlarmsCreateFunction(base::Clock* clock); protected: - virtual ~AlarmsCreateFunction(); + ~AlarmsCreateFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; DECLARE_EXTENSION_FUNCTION("alarms.create", ALARMS_CREATE) private: void Callback(); @@ -41,10 +41,10 @@ class AlarmsCreateFunction : public ChromeAsyncExtensionFunction { class AlarmsGetFunction : public ChromeAsyncExtensionFunction { protected: - virtual ~AlarmsGetFunction() {} + ~AlarmsGetFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void Callback(const std::string& name, Alarm* alarm); @@ -53,10 +53,10 @@ class AlarmsGetFunction : public ChromeAsyncExtensionFunction { class AlarmsGetAllFunction : public ChromeAsyncExtensionFunction { protected: - virtual ~AlarmsGetAllFunction() {} + ~AlarmsGetAllFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void Callback(const AlarmList* alarms); @@ -65,10 +65,10 @@ class AlarmsGetAllFunction : public ChromeAsyncExtensionFunction { class AlarmsClearFunction : public ChromeAsyncExtensionFunction { protected: - virtual ~AlarmsClearFunction() {} + ~AlarmsClearFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void Callback(const std::string& name, bool success); @@ -77,10 +77,10 @@ class AlarmsClearFunction : public ChromeAsyncExtensionFunction { class AlarmsClearAllFunction : public ChromeAsyncExtensionFunction { protected: - virtual ~AlarmsClearAllFunction() {} + ~AlarmsClearAllFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void Callback(); diff --git a/chrome/browser/extensions/api/alarms/alarms_api_unittest.cc b/chrome/browser/extensions/api/alarms/alarms_api_unittest.cc index f3c2d00..dd0603e 100644 --- a/chrome/browser/extensions/api/alarms/alarms_api_unittest.cc +++ b/chrome/browser/extensions/api/alarms/alarms_api_unittest.cc @@ -30,9 +30,8 @@ namespace { // Test delegate which quits the message loop when an alarm fires. class AlarmDelegate : public AlarmManager::Delegate { public: - virtual ~AlarmDelegate() {} - virtual void OnAlarm(const std::string& extension_id, - const Alarm& alarm) override { + ~AlarmDelegate() override {} + void OnAlarm(const std::string& extension_id, const Alarm& alarm) override { alarms_seen.push_back(alarm.js_alarm->name); if (base::MessageLoop::current()->is_running()) base::MessageLoop::current()->Quit(); diff --git a/chrome/browser/extensions/api/audio/audio_api.h b/chrome/browser/extensions/api/audio/audio_api.h index 6bad8f1..d6506cc 100644 --- a/chrome/browser/extensions/api/audio/audio_api.h +++ b/chrome/browser/extensions/api/audio/audio_api.h @@ -16,7 +16,7 @@ class AudioService; class AudioAPI : public BrowserContextKeyedAPI, public AudioService::Observer { public: explicit AudioAPI(content::BrowserContext* context); - virtual ~AudioAPI(); + ~AudioAPI() override; AudioService* GetService() const; @@ -24,7 +24,7 @@ class AudioAPI : public BrowserContextKeyedAPI, public AudioService::Observer { static BrowserContextKeyedAPIFactory<AudioAPI>* GetFactoryInstance(); // AudioService::Observer implementation. - virtual void OnDeviceChanged() override; + void OnDeviceChanged() override; private: friend class BrowserContextKeyedAPIFactory<AudioAPI>; @@ -44,8 +44,8 @@ class AudioGetInfoFunction : public ChromeAsyncExtensionFunction { AUDIO_GETINFO); protected: - virtual ~AudioGetInfoFunction() {} - virtual bool RunAsync() override; + ~AudioGetInfoFunction() override {} + bool RunAsync() override; private: void OnGetInfoCompleted(const OutputInfo& output_info, @@ -59,8 +59,8 @@ class AudioSetActiveDevicesFunction : public ChromeSyncExtensionFunction { AUDIO_SETACTIVEDEVICES); protected: - virtual ~AudioSetActiveDevicesFunction() {} - virtual bool RunSync() override; + ~AudioSetActiveDevicesFunction() override {} + bool RunSync() override; }; class AudioSetPropertiesFunction : public ChromeSyncExtensionFunction { @@ -69,8 +69,8 @@ class AudioSetPropertiesFunction : public ChromeSyncExtensionFunction { AUDIO_SETPROPERTIES); protected: - virtual ~AudioSetPropertiesFunction() {} - virtual bool RunSync() override; + ~AudioSetPropertiesFunction() override {} + bool RunSync() override; }; diff --git a/chrome/browser/extensions/api/audio/audio_service.cc b/chrome/browser/extensions/api/audio/audio_service.cc index ebccc3f..b150323 100644 --- a/chrome/browser/extensions/api/audio/audio_service.cc +++ b/chrome/browser/extensions/api/audio/audio_service.cc @@ -9,19 +9,19 @@ namespace extensions { class AudioServiceImpl : public AudioService { public: AudioServiceImpl() {} - virtual ~AudioServiceImpl() {} + ~AudioServiceImpl() override {} // Called by listeners to this service to add/remove themselves as observers. - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; // Start to query audio device information. - virtual void StartGetInfo(const GetInfoCallback& callback) override; - virtual void SetActiveDevices(const DeviceIdList& device_list) override; - virtual bool SetDeviceProperties(const std::string& device_id, - bool muted, - int volume, - int gain) override; + void StartGetInfo(const GetInfoCallback& callback) override; + void SetActiveDevices(const DeviceIdList& device_list) override; + bool SetDeviceProperties(const std::string& device_id, + bool muted, + int volume, + int gain) override; }; void AudioServiceImpl::AddObserver(Observer* observer) { diff --git a/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc b/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc index 7fe564e..40e184b 100644 --- a/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc +++ b/chrome/browser/extensions/api/automation_internal/automation_internal_api.cc @@ -69,10 +69,10 @@ class AutomationWebContentsObserver : public content::WebContentsObserver, public content::WebContentsUserData<AutomationWebContentsObserver> { public: - virtual ~AutomationWebContentsObserver() {} + ~AutomationWebContentsObserver() override {} // content::WebContentsObserver overrides. - virtual void AccessibilityEventReceived( + void AccessibilityEventReceived( const std::vector<content::AXEventNotificationDetails>& details) override { automation_util::DispatchAccessibilityEventsToAutomation( @@ -80,7 +80,7 @@ class AutomationWebContentsObserver web_contents()->GetContainerBounds().OffsetFromOrigin()); } - virtual void RenderFrameDeleted( + void RenderFrameDeleted( content::RenderFrameHost* render_frame_host) override { automation_util::DispatchTreeDestroyedEventToAutomation( render_frame_host->GetProcess()->GetID(), @@ -110,19 +110,15 @@ class RenderFrameHostActionAdapter : public AutomationActionAdapter { virtual ~RenderFrameHostActionAdapter() {} // AutomationActionAdapter implementation. - virtual void DoDefault(int32 id) override { - rfh_->AccessibilityDoDefaultAction(id); - } + void DoDefault(int32 id) override { rfh_->AccessibilityDoDefaultAction(id); } - virtual void Focus(int32 id) override { - rfh_->AccessibilitySetFocus(id); - } + void Focus(int32 id) override { rfh_->AccessibilitySetFocus(id); } - virtual void MakeVisible(int32 id) override { + void MakeVisible(int32 id) override { rfh_->AccessibilityScrollToMakeVisible(id, gfx::Rect()); } - virtual void SetSelection(int32 id, int32 start, int32 end) override { + void SetSelection(int32 id, int32 start, int32 end) override { rfh_->AccessibilitySetTextSelection(id, start, end); } diff --git a/chrome/browser/extensions/api/automation_internal/automation_internal_api.h b/chrome/browser/extensions/api/automation_internal/automation_internal_api.h index c22e0d5..7912419 100644 --- a/chrome/browser/extensions/api/automation_internal/automation_internal_api.h +++ b/chrome/browser/extensions/api/automation_internal/automation_internal_api.h @@ -37,9 +37,9 @@ class AutomationInternalEnableTabFunction DECLARE_EXTENSION_FUNCTION("automationInternal.enableTab", AUTOMATIONINTERNAL_ENABLETAB) protected: - virtual ~AutomationInternalEnableTabFunction() {} + ~AutomationInternalEnableTabFunction() override {} - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; class AutomationInternalPerformActionFunction @@ -47,9 +47,9 @@ class AutomationInternalPerformActionFunction DECLARE_EXTENSION_FUNCTION("automationInternal.performAction", AUTOMATIONINTERNAL_PERFORMACTION) protected: - virtual ~AutomationInternalPerformActionFunction() {} + ~AutomationInternalPerformActionFunction() override {} - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; private: // Helper function to route an action to an action adapter. @@ -63,9 +63,9 @@ class AutomationInternalEnableDesktopFunction DECLARE_EXTENSION_FUNCTION("automationInternal.enableDesktop", AUTOMATIONINTERNAL_ENABLEDESKTOP) protected: - virtual ~AutomationInternalEnableDesktopFunction() {} + ~AutomationInternalEnableDesktopFunction() override {} - virtual ResponseAction Run() override; + ResponseAction Run() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/autotest_private/autotest_private_api.h b/chrome/browser/extensions/api/autotest_private/autotest_private_api.h index c70a63f..37a5c35 100644 --- a/chrome/browser/extensions/api/autotest_private/autotest_private_api.h +++ b/chrome/browser/extensions/api/autotest_private/autotest_private_api.h @@ -18,8 +18,8 @@ class AutotestPrivateLogoutFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("autotestPrivate.logout", AUTOTESTPRIVATE_LOGOUT) private: - virtual ~AutotestPrivateLogoutFunction() {} - virtual bool RunSync() override; + ~AutotestPrivateLogoutFunction() override {} + bool RunSync() override; }; class AutotestPrivateRestartFunction : public ChromeSyncExtensionFunction { @@ -27,8 +27,8 @@ class AutotestPrivateRestartFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("autotestPrivate.restart", AUTOTESTPRIVATE_RESTART) private: - virtual ~AutotestPrivateRestartFunction() {} - virtual bool RunSync() override; + ~AutotestPrivateRestartFunction() override {} + bool RunSync() override; }; class AutotestPrivateShutdownFunction : public ChromeSyncExtensionFunction { @@ -37,8 +37,8 @@ class AutotestPrivateShutdownFunction : public ChromeSyncExtensionFunction { AUTOTESTPRIVATE_SHUTDOWN) private: - virtual ~AutotestPrivateShutdownFunction() {} - virtual bool RunSync() override; + ~AutotestPrivateShutdownFunction() override {} + bool RunSync() override; }; class AutotestPrivateLoginStatusFunction : public ChromeSyncExtensionFunction { @@ -47,8 +47,8 @@ class AutotestPrivateLoginStatusFunction : public ChromeSyncExtensionFunction { AUTOTESTPRIVATE_LOGINSTATUS) private: - virtual ~AutotestPrivateLoginStatusFunction() {} - virtual bool RunSync() override; + ~AutotestPrivateLoginStatusFunction() override {} + bool RunSync() override; }; class AutotestPrivateLockScreenFunction : public ChromeSyncExtensionFunction { @@ -57,8 +57,8 @@ class AutotestPrivateLockScreenFunction : public ChromeSyncExtensionFunction { AUTOTESTPRIVATE_LOCKSCREEN) private: - virtual ~AutotestPrivateLockScreenFunction() {} - virtual bool RunSync() override; + ~AutotestPrivateLockScreenFunction() override {} + bool RunSync() override; }; class AutotestPrivateGetExtensionsInfoFunction @@ -68,8 +68,8 @@ class AutotestPrivateGetExtensionsInfoFunction AUTOTESTPRIVATE_GETEXTENSIONSINFO) private: - virtual ~AutotestPrivateGetExtensionsInfoFunction() {} - virtual bool RunSync() override; + ~AutotestPrivateGetExtensionsInfoFunction() override {} + bool RunSync() override; }; class AutotestPrivateSimulateAsanMemoryBugFunction @@ -79,8 +79,8 @@ class AutotestPrivateSimulateAsanMemoryBugFunction AUTOTESTPRIVATE_SIMULATEASANMEMORYBUG) private: - virtual ~AutotestPrivateSimulateAsanMemoryBugFunction() {} - virtual bool RunSync() override; + ~AutotestPrivateSimulateAsanMemoryBugFunction() override {} + bool RunSync() override; }; // Don't kill the browser when we're in a browser test. @@ -100,7 +100,7 @@ class AutotestPrivateAPI : public BrowserContextKeyedAPI { friend class BrowserContextKeyedAPIFactory<AutotestPrivateAPI>; AutotestPrivateAPI(); - virtual ~AutotestPrivateAPI(); + ~AutotestPrivateAPI() override; // BrowserContextKeyedAPI implementation. static const char* service_name() { return "AutotestPrivateAPI"; } diff --git a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h index cebe6dd..a9e6944 100644 --- a/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h +++ b/chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h @@ -34,15 +34,15 @@ class BookmarkManagerPrivateEventRouter : public BaseBookmarkModelObserver { public: BookmarkManagerPrivateEventRouter(content::BrowserContext* browser_context, BookmarkModel* bookmark_model); - virtual ~BookmarkManagerPrivateEventRouter(); + ~BookmarkManagerPrivateEventRouter() override; // BaseBookmarkModelObserver: - virtual void BookmarkModelChanged() override; - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) override; - virtual void OnWillChangeBookmarkMetaInfo(BookmarkModel* model, - const BookmarkNode* node) override; - virtual void BookmarkMetaInfoChanged(BookmarkModel* model, - const BookmarkNode* node) override; + void BookmarkModelChanged() override; + void BookmarkModelBeingDeleted(BookmarkModel* model) override; + void OnWillChangeBookmarkMetaInfo(BookmarkModel* model, + const BookmarkNode* node) override; + void BookmarkMetaInfoChanged(BookmarkModel* model, + const BookmarkNode* node) override; private: // Helper to actually dispatch an event to extension listeners. @@ -60,17 +60,17 @@ class BookmarkManagerPrivateAPI : public BrowserContextKeyedAPI, public EventRouter::Observer { public: explicit BookmarkManagerPrivateAPI(content::BrowserContext* browser_context); - virtual ~BookmarkManagerPrivateAPI(); + ~BookmarkManagerPrivateAPI() override; // BrowserContextKeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<BookmarkManagerPrivateAPI>* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<BookmarkManagerPrivateAPI>; @@ -92,13 +92,13 @@ class BookmarkManagerPrivateDragEventRouter public: BookmarkManagerPrivateDragEventRouter(Profile* profile, content::WebContents* web_contents); - virtual ~BookmarkManagerPrivateDragEventRouter(); + ~BookmarkManagerPrivateDragEventRouter() override; // BookmarkTabHelper::BookmarkDrag interface - virtual void OnDragEnter(const bookmarks::BookmarkNodeData& data) override; - virtual void OnDragOver(const bookmarks::BookmarkNodeData& data) override; - virtual void OnDragLeave(const bookmarks::BookmarkNodeData& data) override; - virtual void OnDrop(const bookmarks::BookmarkNodeData& data) override; + void OnDragEnter(const bookmarks::BookmarkNodeData& data) override; + void OnDragOver(const bookmarks::BookmarkNodeData& data) override; + void OnDragLeave(const bookmarks::BookmarkNodeData& data) override; + void OnDrop(const bookmarks::BookmarkNodeData& data) override; // The bookmark drag and drop data. This gets set after a drop was done on // the page. This returns NULL if no data is available. @@ -121,7 +121,7 @@ class BookmarkManagerPrivateDragEventRouter class ClipboardBookmarkManagerFunction : public extensions::BookmarksFunction { protected: - virtual ~ClipboardBookmarkManagerFunction() {} + ~ClipboardBookmarkManagerFunction() override {} bool CopyOrCut(bool cut, const std::vector<std::string>& id_list); }; @@ -133,10 +133,10 @@ class BookmarkManagerPrivateCopyFunction BOOKMARKMANAGERPRIVATE_COPY) protected: - virtual ~BookmarkManagerPrivateCopyFunction() {} + ~BookmarkManagerPrivateCopyFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateCutFunction @@ -146,10 +146,10 @@ class BookmarkManagerPrivateCutFunction BOOKMARKMANAGERPRIVATE_CUT) protected: - virtual ~BookmarkManagerPrivateCutFunction() {} + ~BookmarkManagerPrivateCutFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivatePasteFunction @@ -159,10 +159,10 @@ class BookmarkManagerPrivatePasteFunction BOOKMARKMANAGERPRIVATE_PASTE) protected: - virtual ~BookmarkManagerPrivatePasteFunction() {} + ~BookmarkManagerPrivatePasteFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateCanPasteFunction @@ -172,10 +172,10 @@ class BookmarkManagerPrivateCanPasteFunction BOOKMARKMANAGERPRIVATE_CANPASTE) protected: - virtual ~BookmarkManagerPrivateCanPasteFunction() {} + ~BookmarkManagerPrivateCanPasteFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateSortChildrenFunction @@ -185,10 +185,10 @@ class BookmarkManagerPrivateSortChildrenFunction BOOKMARKMANAGERPRIVATE_SORTCHILDREN) protected: - virtual ~BookmarkManagerPrivateSortChildrenFunction() {} + ~BookmarkManagerPrivateSortChildrenFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateGetStringsFunction : public AsyncExtensionFunction { @@ -197,10 +197,10 @@ class BookmarkManagerPrivateGetStringsFunction : public AsyncExtensionFunction { BOOKMARKMANAGERPRIVATE_GETSTRINGS) protected: - virtual ~BookmarkManagerPrivateGetStringsFunction() {} + ~BookmarkManagerPrivateGetStringsFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; class BookmarkManagerPrivateStartDragFunction @@ -210,10 +210,10 @@ class BookmarkManagerPrivateStartDragFunction BOOKMARKMANAGERPRIVATE_STARTDRAG) protected: - virtual ~BookmarkManagerPrivateStartDragFunction() {} + ~BookmarkManagerPrivateStartDragFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateDropFunction @@ -223,10 +223,10 @@ class BookmarkManagerPrivateDropFunction BOOKMARKMANAGERPRIVATE_DROP) protected: - virtual ~BookmarkManagerPrivateDropFunction() {} + ~BookmarkManagerPrivateDropFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateGetSubtreeFunction @@ -236,10 +236,10 @@ class BookmarkManagerPrivateGetSubtreeFunction BOOKMARKMANAGERPRIVATE_GETSUBTREE) protected: - virtual ~BookmarkManagerPrivateGetSubtreeFunction() {} + ~BookmarkManagerPrivateGetSubtreeFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateCanEditFunction @@ -249,10 +249,10 @@ class BookmarkManagerPrivateCanEditFunction BOOKMARKMANAGERPRIVATE_CANEDIT) protected: - virtual ~BookmarkManagerPrivateCanEditFunction() {} + ~BookmarkManagerPrivateCanEditFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateRecordLaunchFunction @@ -262,10 +262,10 @@ class BookmarkManagerPrivateRecordLaunchFunction BOOKMARKMANAGERPRIVATE_RECORDLAUNCH) protected: - virtual ~BookmarkManagerPrivateRecordLaunchFunction() {} + ~BookmarkManagerPrivateRecordLaunchFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateCreateWithMetaInfoFunction @@ -275,10 +275,10 @@ class BookmarkManagerPrivateCreateWithMetaInfoFunction BOOKMARKMANAGERPRIVATE_CREATEWITHMETAINFO) protected: - virtual ~BookmarkManagerPrivateCreateWithMetaInfoFunction() {} + ~BookmarkManagerPrivateCreateWithMetaInfoFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateGetMetaInfoFunction @@ -288,10 +288,10 @@ class BookmarkManagerPrivateGetMetaInfoFunction BOOKMARKMANAGERPRIVATE_GETMETAINFO) protected: - virtual ~BookmarkManagerPrivateGetMetaInfoFunction() {} + ~BookmarkManagerPrivateGetMetaInfoFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateSetMetaInfoFunction @@ -301,10 +301,10 @@ class BookmarkManagerPrivateSetMetaInfoFunction BOOKMARKMANAGERPRIVATE_SETMETAINFO) protected: - virtual ~BookmarkManagerPrivateSetMetaInfoFunction() {} + ~BookmarkManagerPrivateSetMetaInfoFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateUpdateMetaInfoFunction @@ -314,10 +314,10 @@ class BookmarkManagerPrivateUpdateMetaInfoFunction BOOKMARKMANAGERPRIVATE_UPDATEMETAINFO) protected: - virtual ~BookmarkManagerPrivateUpdateMetaInfoFunction() {} + ~BookmarkManagerPrivateUpdateMetaInfoFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateCanOpenNewWindowsFunction @@ -327,10 +327,10 @@ class BookmarkManagerPrivateCanOpenNewWindowsFunction BOOKMARKMANAGERPRIVATE_CANOPENNEWWINDOWS) protected: - virtual ~BookmarkManagerPrivateCanOpenNewWindowsFunction() {} + ~BookmarkManagerPrivateCanOpenNewWindowsFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateRemoveTreesFunction @@ -340,10 +340,10 @@ class BookmarkManagerPrivateRemoveTreesFunction BOOKMARKMANAGERPRIVATE_REMOVETREES) protected: - virtual ~BookmarkManagerPrivateRemoveTreesFunction() {} + ~BookmarkManagerPrivateRemoveTreesFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateUndoFunction @@ -353,10 +353,10 @@ class BookmarkManagerPrivateUndoFunction BOOKMARKMANAGERPRIVATE_UNDO) protected: - virtual ~BookmarkManagerPrivateUndoFunction() {} + ~BookmarkManagerPrivateUndoFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateRedoFunction @@ -366,10 +366,10 @@ class BookmarkManagerPrivateRedoFunction BOOKMARKMANAGERPRIVATE_REDO) protected: - virtual ~BookmarkManagerPrivateRedoFunction() {} + ~BookmarkManagerPrivateRedoFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateGetUndoInfoFunction @@ -379,10 +379,10 @@ class BookmarkManagerPrivateGetUndoInfoFunction BOOKMARKMANAGERPRIVATE_UNDOINFO) protected: - virtual ~BookmarkManagerPrivateGetUndoInfoFunction() {} + ~BookmarkManagerPrivateGetUndoInfoFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateGetRedoInfoFunction @@ -392,10 +392,10 @@ class BookmarkManagerPrivateGetRedoInfoFunction BOOKMARKMANAGERPRIVATE_REDOINFO) protected: - virtual ~BookmarkManagerPrivateGetRedoInfoFunction() {} + ~BookmarkManagerPrivateGetRedoInfoFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarkManagerPrivateSetVersionFunction @@ -405,10 +405,10 @@ class BookmarkManagerPrivateSetVersionFunction BOOKMARKMANAGERPRIVATE_SETVERSION); protected: - virtual ~BookmarkManagerPrivateSetVersionFunction() {} + ~BookmarkManagerPrivateSetVersionFunction() override {} // ExtensionFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h index 544d67f..e799c5b 100644 --- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h +++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h @@ -42,36 +42,34 @@ struct CreateDetails; class BookmarkEventRouter : public BookmarkModelObserver { public: explicit BookmarkEventRouter(Profile* profile); - virtual ~BookmarkEventRouter(); + ~BookmarkEventRouter() override; // BookmarkModelObserver: - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) override; - virtual void BookmarkModelBeingDeleted(BookmarkModel* model) override; - virtual void BookmarkNodeMoved(BookmarkModel* model, - const BookmarkNode* old_parent, - int old_index, - const BookmarkNode* new_parent, - int new_index) override; - virtual void BookmarkNodeAdded(BookmarkModel* model, - const BookmarkNode* parent, - int index) override; - virtual void BookmarkNodeRemoved(BookmarkModel* model, - const BookmarkNode* parent, - int old_index, - const BookmarkNode* node, + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; + void BookmarkModelBeingDeleted(BookmarkModel* model) override; + void BookmarkNodeMoved(BookmarkModel* model, + const BookmarkNode* old_parent, + int old_index, + const BookmarkNode* new_parent, + int new_index) override; + void BookmarkNodeAdded(BookmarkModel* model, + const BookmarkNode* parent, + int index) override; + void BookmarkNodeRemoved(BookmarkModel* model, + const BookmarkNode* parent, + int old_index, + const BookmarkNode* node, + const std::set<GURL>& removed_urls) override; + void BookmarkAllUserNodesRemoved(BookmarkModel* model, const std::set<GURL>& removed_urls) override; - virtual void BookmarkAllUserNodesRemoved( - BookmarkModel* model, - const std::set<GURL>& removed_urls) override; - virtual void BookmarkNodeChanged(BookmarkModel* model, - const BookmarkNode* node) override; - virtual void BookmarkNodeFaviconChanged(BookmarkModel* model, - const BookmarkNode* node) override; - virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, - const BookmarkNode* node) override; - virtual void ExtensiveBookmarkChangesBeginning(BookmarkModel* model) override; - virtual void ExtensiveBookmarkChangesEnded(BookmarkModel* model) override; + void BookmarkNodeChanged(BookmarkModel* model, + const BookmarkNode* node) override; + void BookmarkNodeFaviconChanged(BookmarkModel* model, + const BookmarkNode* node) override; + void BookmarkNodeChildrenReordered(BookmarkModel* model, + const BookmarkNode* node) override; + void ExtensiveBookmarkChangesBeginning(BookmarkModel* model) override; + void ExtensiveBookmarkChangesEnded(BookmarkModel* model) override; private: // Helper to actually dispatch an event to extension listeners. @@ -89,17 +87,16 @@ class BookmarksAPI : public BrowserContextKeyedAPI, public EventRouter::Observer { public: explicit BookmarksAPI(content::BrowserContext* context); - virtual ~BookmarksAPI(); + ~BookmarksAPI() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<BookmarksAPI>* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded( - const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<BookmarksAPI>; @@ -120,10 +117,10 @@ class BookmarksFunction : public ChromeAsyncExtensionFunction, public BaseBookmarkModelObserver { public: // AsyncExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~BookmarksFunction() {} + ~BookmarksFunction() override {} // RunAsync semantic equivalent called when the bookmarks are ready. virtual bool RunOnReady() = 0; @@ -163,9 +160,8 @@ class BookmarksFunction : public ChromeAsyncExtensionFunction, private: // BaseBookmarkModelObserver: - virtual void BookmarkModelChanged() override; - virtual void BookmarkModelLoaded(BookmarkModel* model, - bool ids_reassigned) override; + void BookmarkModelChanged() override; + void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override; }; class BookmarksGetFunction : public BookmarksFunction { @@ -173,10 +169,10 @@ class BookmarksGetFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.get", BOOKMARKS_GET) protected: - virtual ~BookmarksGetFunction() {} + ~BookmarksGetFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksGetChildrenFunction : public BookmarksFunction { @@ -184,10 +180,10 @@ class BookmarksGetChildrenFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.getChildren", BOOKMARKS_GETCHILDREN) protected: - virtual ~BookmarksGetChildrenFunction() {} + ~BookmarksGetChildrenFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksGetRecentFunction : public BookmarksFunction { @@ -195,10 +191,10 @@ class BookmarksGetRecentFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.getRecent", BOOKMARKS_GETRECENT) protected: - virtual ~BookmarksGetRecentFunction() {} + ~BookmarksGetRecentFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksGetTreeFunction : public BookmarksFunction { @@ -206,10 +202,10 @@ class BookmarksGetTreeFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.getTree", BOOKMARKS_GETTREE) protected: - virtual ~BookmarksGetTreeFunction() {} + ~BookmarksGetTreeFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksGetSubTreeFunction : public BookmarksFunction { @@ -217,10 +213,10 @@ class BookmarksGetSubTreeFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.getSubTree", BOOKMARKS_GETSUBTREE) protected: - virtual ~BookmarksGetSubTreeFunction() {} + ~BookmarksGetSubTreeFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksSearchFunction : public BookmarksFunction { @@ -228,10 +224,10 @@ class BookmarksSearchFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.search", BOOKMARKS_SEARCH) protected: - virtual ~BookmarksSearchFunction() {} + ~BookmarksSearchFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksRemoveFunction : public BookmarksFunction { @@ -245,10 +241,10 @@ class BookmarksRemoveFunction : public BookmarksFunction { bool* invalid_id); protected: - virtual ~BookmarksRemoveFunction() {} + ~BookmarksRemoveFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksRemoveTreeFunction : public BookmarksRemoveFunction { @@ -256,7 +252,7 @@ class BookmarksRemoveTreeFunction : public BookmarksRemoveFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.removeTree", BOOKMARKS_REMOVETREE) protected: - virtual ~BookmarksRemoveTreeFunction() {} + ~BookmarksRemoveTreeFunction() override {} }; class BookmarksCreateFunction : public BookmarksFunction { @@ -264,10 +260,10 @@ class BookmarksCreateFunction : public BookmarksFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.create", BOOKMARKS_CREATE) protected: - virtual ~BookmarksCreateFunction() {} + ~BookmarksCreateFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksMoveFunction : public BookmarksFunction { @@ -279,10 +275,10 @@ class BookmarksMoveFunction : public BookmarksFunction { bool* invalid_id); protected: - virtual ~BookmarksMoveFunction() {} + ~BookmarksMoveFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksUpdateFunction : public BookmarksFunction { @@ -294,10 +290,10 @@ class BookmarksUpdateFunction : public BookmarksFunction { bool* invalid_id); protected: - virtual ~BookmarksUpdateFunction() {} + ~BookmarksUpdateFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksIOFunction : public BookmarksFunction, @@ -308,14 +304,14 @@ class BookmarksIOFunction : public BookmarksFunction, virtual void FileSelected(const base::FilePath& path, int index, void* params) = 0; // ui::SelectFileDialog::Listener: - virtual void MultiFilesSelected(const std::vector<base::FilePath>& files, - void* params) override; - virtual void FileSelectionCanceled(void* params) override; + void MultiFilesSelected(const std::vector<base::FilePath>& files, + void* params) override; + void FileSelectionCanceled(void* params) override; void SelectFile(ui::SelectFileDialog::Type type); protected: - virtual ~BookmarksIOFunction(); + ~BookmarksIOFunction() override; private: void ShowSelectFileDialog( @@ -331,15 +327,15 @@ class BookmarksImportFunction : public BookmarksIOFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.import", BOOKMARKS_IMPORT) // BookmarkManagerIOFunction: - virtual void FileSelected(const base::FilePath& path, - int index, - void* params) override; + void FileSelected(const base::FilePath& path, + int index, + void* params) override; private: - virtual ~BookmarksImportFunction() {} + ~BookmarksImportFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; class BookmarksExportFunction : public BookmarksIOFunction { @@ -347,15 +343,15 @@ class BookmarksExportFunction : public BookmarksIOFunction { DECLARE_EXTENSION_FUNCTION("bookmarks.export", BOOKMARKS_EXPORT) // BookmarkManagerIOFunction: - virtual void FileSelected(const base::FilePath& path, - int index, - void* params) override; + void FileSelected(const base::FilePath& path, + int index, + void* params) override; private: - virtual ~BookmarksExportFunction() {} + ~BookmarksExportFunction() override {} // BookmarksFunction: - virtual bool RunOnReady() override; + bool RunOnReady() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/braille_display_private/braille_controller_stub.cc b/chrome/browser/extensions/api/braille_display_private/braille_controller_stub.cc index 6ba977d..ba394d0 100644 --- a/chrome/browser/extensions/api/braille_display_private/braille_controller_stub.cc +++ b/chrome/browser/extensions/api/braille_display_private/braille_controller_stub.cc @@ -17,14 +17,14 @@ namespace braille_display_private { class BrailleControllerImpl : public BrailleController { public: static BrailleControllerImpl* GetInstance(); - virtual scoped_ptr<DisplayState> GetDisplayState() override; - virtual void WriteDots(const std::string& cells) override; - virtual void AddObserver(BrailleObserver* observer) override; - virtual void RemoveObserver(BrailleObserver* observer) override; + scoped_ptr<DisplayState> GetDisplayState() override; + void WriteDots(const std::string& cells) override; + void AddObserver(BrailleObserver* observer) override; + void RemoveObserver(BrailleObserver* observer) override; private: BrailleControllerImpl(); - virtual ~BrailleControllerImpl(); + ~BrailleControllerImpl() override; friend struct DefaultSingletonTraits<BrailleControllerImpl>; DISALLOW_COPY_AND_ASSIGN(BrailleControllerImpl); }; diff --git a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc index 20e7a15..f5d8e50 100644 --- a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc +++ b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.cc @@ -29,10 +29,10 @@ class BrailleDisplayPrivateAPI::DefaultEventDelegate : public BrailleDisplayPrivateAPI::EventDelegate { public: DefaultEventDelegate(EventRouter::Observer* observer, Profile* profile); - virtual ~DefaultEventDelegate(); + ~DefaultEventDelegate() override; - virtual void BroadcastEvent(scoped_ptr<Event> event) override; - virtual bool HasListener() override; + void BroadcastEvent(scoped_ptr<Event> event) override; + bool HasListener() override; private: EventRouter::Observer* observer_; diff --git a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h index d27554e..c1b23e7 100644 --- a/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h +++ b/chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h @@ -27,25 +27,24 @@ class BrailleDisplayPrivateAPI : public BrowserContextKeyedAPI, EventRouter::Observer { public: explicit BrailleDisplayPrivateAPI(content::BrowserContext* context); - virtual ~BrailleDisplayPrivateAPI(); + ~BrailleDisplayPrivateAPI() override; // ProfileKeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<BrailleDisplayPrivateAPI>* GetFactoryInstance(); // BrailleObserver implementation. - virtual void OnBrailleDisplayStateChanged( + void OnBrailleDisplayStateChanged( const api::braille_display_private::DisplayState& display_state) override; - virtual void OnBrailleKeyEvent( + void OnBrailleKeyEvent( const api::braille_display_private::KeyEvent& keyEvent) override; // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; - + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<BrailleDisplayPrivateAPI>; @@ -85,10 +84,10 @@ class BrailleDisplayPrivateGetDisplayStateFunction : public AsyncApiFunction { DECLARE_EXTENSION_FUNCTION("brailleDisplayPrivate.getDisplayState", BRAILLEDISPLAYPRIVATE_GETDISPLAYSTATE) protected: - virtual ~BrailleDisplayPrivateGetDisplayStateFunction() {} - virtual bool Prepare() override; - virtual void Work() override; - virtual bool Respond() override; + ~BrailleDisplayPrivateGetDisplayStateFunction() override {} + bool Prepare() override; + void Work() override; + bool Respond() override; }; class BrailleDisplayPrivateWriteDotsFunction : public AsyncApiFunction { @@ -98,10 +97,10 @@ class BrailleDisplayPrivateWriteDotsFunction : public AsyncApiFunction { BrailleDisplayPrivateWriteDotsFunction(); protected: - virtual ~BrailleDisplayPrivateWriteDotsFunction(); - virtual bool Prepare() override; - virtual void Work() override; - virtual bool Respond() override; + ~BrailleDisplayPrivateWriteDotsFunction() override; + bool Prepare() override; + void Work() override; + bool Respond() override; private: scoped_ptr<braille_display_private::WriteDots::Params> params_; diff --git a/chrome/browser/extensions/api/braille_display_private/mock_braille_controller.h b/chrome/browser/extensions/api/braille_display_private/mock_braille_controller.h index f7e680e..9ce52bc 100644 --- a/chrome/browser/extensions/api/braille_display_private/mock_braille_controller.h +++ b/chrome/browser/extensions/api/braille_display_private/mock_braille_controller.h @@ -16,9 +16,9 @@ class MockBrailleController : public StubBrailleController { public: MockBrailleController(); - virtual scoped_ptr<DisplayState> GetDisplayState() override; - virtual void AddObserver(BrailleObserver* observer) override; - virtual void RemoveObserver(BrailleObserver* observer) override; + scoped_ptr<DisplayState> GetDisplayState() override; + void AddObserver(BrailleObserver* observer) override; + void RemoveObserver(BrailleObserver* observer) override; // Sets the available flag without calling the observer. void SetAvailable(bool available); diff --git a/chrome/browser/extensions/api/braille_display_private/stub_braille_controller.h b/chrome/browser/extensions/api/braille_display_private/stub_braille_controller.h index da803e4..66ea0369 100644 --- a/chrome/browser/extensions/api/braille_display_private/stub_braille_controller.h +++ b/chrome/browser/extensions/api/braille_display_private/stub_braille_controller.h @@ -15,10 +15,10 @@ namespace braille_display_private { class StubBrailleController : public BrailleController { public: StubBrailleController(); - virtual scoped_ptr<DisplayState> GetDisplayState() override; - virtual void WriteDots(const std::string& cells) override; - virtual void AddObserver(BrailleObserver* observer) override; - virtual void RemoveObserver(BrailleObserver* observer) override; + scoped_ptr<DisplayState> GetDisplayState() override; + void WriteDots(const std::string& cells) override; + void AddObserver(BrailleObserver* observer) override; + void RemoveObserver(BrailleObserver* observer) override; }; } // namespace braille_display_private diff --git a/chrome/browser/extensions/api/browser/browser_api.h b/chrome/browser/extensions/api/browser/browser_api.h index e291605..634c568 100644 --- a/chrome/browser/extensions/api/browser/browser_api.h +++ b/chrome/browser/extensions/api/browser/browser_api.h @@ -16,9 +16,9 @@ class BrowserOpenTabFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("browser.openTab", BROWSER_OPENTAB) protected: - virtual ~BrowserOpenTabFunction(); + ~BrowserOpenTabFunction() override; - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace api diff --git a/chrome/browser/extensions/api/browsing_data/browsing_data_api.h b/chrome/browser/extensions/api/browsing_data/browsing_data_api.h index 71da2c7..815e022 100644 --- a/chrome/browser/extensions/api/browsing_data/browsing_data_api.h +++ b/chrome/browser/extensions/api/browsing_data/browsing_data_api.h @@ -57,10 +57,10 @@ class BrowsingDataSettingsFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("browsingData.settings", BROWSINGDATA_SETTINGS) // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; protected: - virtual ~BrowsingDataSettingsFunction() {} + ~BrowsingDataSettingsFunction() override {} private: // Sets a boolean value in the |selected_dict| with the |data_type| as a key, @@ -84,13 +84,13 @@ class BrowsingDataRemoverFunction : public ChromeAsyncExtensionFunction, public BrowsingDataRemover::Observer { public: // BrowsingDataRemover::Observer interface method. - virtual void OnBrowsingDataRemoverDone() override; + void OnBrowsingDataRemoverDone() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~BrowsingDataRemoverFunction() {} + ~BrowsingDataRemoverFunction() override {} // Children should override this method to provide the proper removal mask // based on the API call they represent. @@ -120,10 +120,10 @@ class BrowsingDataRemoveAppcacheFunction : public BrowsingDataRemoverFunction { BROWSINGDATA_REMOVEAPPCACHE) protected: - virtual ~BrowsingDataRemoveAppcacheFunction() {} + ~BrowsingDataRemoveAppcacheFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveFunction : public BrowsingDataRemoverFunction { @@ -131,10 +131,10 @@ class BrowsingDataRemoveFunction : public BrowsingDataRemoverFunction { DECLARE_EXTENSION_FUNCTION("browsingData.remove", BROWSINGDATA_REMOVE) protected: - virtual ~BrowsingDataRemoveFunction() {} + ~BrowsingDataRemoveFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveCacheFunction : public BrowsingDataRemoverFunction { @@ -143,10 +143,10 @@ class BrowsingDataRemoveCacheFunction : public BrowsingDataRemoverFunction { BROWSINGDATA_REMOVECACHE) protected: - virtual ~BrowsingDataRemoveCacheFunction() {} + ~BrowsingDataRemoveCacheFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveCookiesFunction : public BrowsingDataRemoverFunction { @@ -155,10 +155,10 @@ class BrowsingDataRemoveCookiesFunction : public BrowsingDataRemoverFunction { BROWSINGDATA_REMOVECOOKIES) protected: - virtual ~BrowsingDataRemoveCookiesFunction() {} + ~BrowsingDataRemoveCookiesFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveDownloadsFunction : public BrowsingDataRemoverFunction { @@ -167,10 +167,10 @@ class BrowsingDataRemoveDownloadsFunction : public BrowsingDataRemoverFunction { BROWSINGDATA_REMOVEDOWNLOADS) protected: - virtual ~BrowsingDataRemoveDownloadsFunction() {} + ~BrowsingDataRemoveDownloadsFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveFileSystemsFunction @@ -180,10 +180,10 @@ class BrowsingDataRemoveFileSystemsFunction BROWSINGDATA_REMOVEFILESYSTEMS) protected: - virtual ~BrowsingDataRemoveFileSystemsFunction() {} + ~BrowsingDataRemoveFileSystemsFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveFormDataFunction : public BrowsingDataRemoverFunction { @@ -192,10 +192,10 @@ class BrowsingDataRemoveFormDataFunction : public BrowsingDataRemoverFunction { BROWSINGDATA_REMOVEFORMDATA) protected: - virtual ~BrowsingDataRemoveFormDataFunction() {} + ~BrowsingDataRemoveFormDataFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveHistoryFunction : public BrowsingDataRemoverFunction { @@ -204,10 +204,10 @@ class BrowsingDataRemoveHistoryFunction : public BrowsingDataRemoverFunction { BROWSINGDATA_REMOVEHISTORY) protected: - virtual ~BrowsingDataRemoveHistoryFunction() {} + ~BrowsingDataRemoveHistoryFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveIndexedDBFunction : public BrowsingDataRemoverFunction { @@ -216,10 +216,10 @@ class BrowsingDataRemoveIndexedDBFunction : public BrowsingDataRemoverFunction { BROWSINGDATA_REMOVEINDEXEDDB) protected: - virtual ~BrowsingDataRemoveIndexedDBFunction() {} + ~BrowsingDataRemoveIndexedDBFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveLocalStorageFunction @@ -229,10 +229,10 @@ class BrowsingDataRemoveLocalStorageFunction BROWSINGDATA_REMOVELOCALSTORAGE) protected: - virtual ~BrowsingDataRemoveLocalStorageFunction() {} + ~BrowsingDataRemoveLocalStorageFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemovePluginDataFunction @@ -242,10 +242,10 @@ class BrowsingDataRemovePluginDataFunction BROWSINGDATA_REMOVEPLUGINDATA) protected: - virtual ~BrowsingDataRemovePluginDataFunction() {} + ~BrowsingDataRemovePluginDataFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemovePasswordsFunction : public BrowsingDataRemoverFunction { @@ -254,10 +254,10 @@ class BrowsingDataRemovePasswordsFunction : public BrowsingDataRemoverFunction { BROWSINGDATA_REMOVEPASSWORDS) protected: - virtual ~BrowsingDataRemovePasswordsFunction() {} + ~BrowsingDataRemovePasswordsFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveServiceWorkersFunction @@ -267,10 +267,10 @@ class BrowsingDataRemoveServiceWorkersFunction BROWSINGDATA_REMOVESERVICEWORKERS) protected: - virtual ~BrowsingDataRemoveServiceWorkersFunction() {} + ~BrowsingDataRemoveServiceWorkersFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; class BrowsingDataRemoveWebSQLFunction : public BrowsingDataRemoverFunction { @@ -279,10 +279,10 @@ class BrowsingDataRemoveWebSQLFunction : public BrowsingDataRemoverFunction { BROWSINGDATA_REMOVEWEBSQL) protected: - virtual ~BrowsingDataRemoveWebSQLFunction() {} + ~BrowsingDataRemoveWebSQLFunction() override {} // BrowsingDataRemoverFunction: - virtual int GetRemovalMask() override; + int GetRemovalMask() override; }; #endif // CHROME_BROWSER_EXTENSIONS_API_BROWSING_DATA_BROWSING_DATA_API_H_ diff --git a/chrome/browser/extensions/api/browsing_data/browsing_data_test.cc b/chrome/browser/extensions/api/browsing_data/browsing_data_test.cc index 88c8468..3a1c15e 100644 --- a/chrome/browser/extensions/api/browsing_data/browsing_data_test.cc +++ b/chrome/browser/extensions/api/browsing_data/browsing_data_test.cc @@ -58,16 +58,16 @@ class ExtensionBrowsingDataTest : public InProcessBrowserTest, } protected: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { called_with_details_.reset(new BrowsingDataRemover::NotificationDetails()); registrar_.Add(this, chrome::NOTIFICATION_BROWSING_DATA_REMOVED, content::Source<Profile>(browser()->profile())); } // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { DCHECK_EQ(type, chrome::NOTIFICATION_BROWSING_DATA_REMOVED); // We're not taking ownership of the details object, but storing a copy of diff --git a/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc b/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc index 7c838f7..799e658 100644 --- a/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc +++ b/chrome/browser/extensions/api/cast_streaming/cast_streaming_apitest.cc @@ -37,7 +37,7 @@ namespace extensions { class CastStreamingApiTest : public ExtensionApiTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( extensions::switches::kWhitelistedExtensionID, @@ -110,7 +110,7 @@ class TestPatternReceiver : public media::cast::InProcessReceiver { WithFakeAesKeyAndIv(media::cast::GetDefaultVideoReceiverConfig())) { } - virtual ~TestPatternReceiver() {} + ~TestPatternReceiver() override {} void AddExpectedTone(int tone_frequency) { expected_tones_.push_back(tone_frequency); @@ -153,9 +153,9 @@ class TestPatternReceiver : public media::cast::InProcessReceiver { } // Invoked by InProcessReceiver for each received audio frame. - virtual void OnAudioFrame(scoped_ptr<media::AudioBus> audio_frame, - const base::TimeTicks& playout_time, - bool is_continuous) override { + void OnAudioFrame(scoped_ptr<media::AudioBus> audio_frame, + const base::TimeTicks& playout_time, + bool is_continuous) override { DCHECK(cast_env()->CurrentlyOn(media::cast::CastEnvironment::MAIN)); if (audio_frame->frames() <= 0) { @@ -192,9 +192,9 @@ class TestPatternReceiver : public media::cast::InProcessReceiver { } } - virtual void OnVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, - const base::TimeTicks& playout_time, - bool is_continuous) override { + void OnVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, + const base::TimeTicks& playout_time, + bool is_continuous) override { DCHECK(cast_env()->CurrentlyOn(media::cast::CastEnvironment::MAIN)); CHECK(video_frame->format() == media::VideoFrame::YV12 || @@ -321,7 +321,7 @@ class CastStreamingApiTestWithPixelOutput : public CastStreamingApiTest { CastStreamingApiTest::SetUp(); } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitchASCII(::switches::kWindowSize, "128,128"); CastStreamingApiTest::SetUpCommandLine(command_line); } diff --git a/chrome/browser/extensions/api/cast_streaming/performance_test.cc b/chrome/browser/extensions/api/cast_streaming/performance_test.cc index 8234ede..f15d7e8 100644 --- a/chrome/browser/extensions/api/cast_streaming/performance_test.cc +++ b/chrome/browser/extensions/api/cast_streaming/performance_test.cc @@ -81,7 +81,7 @@ class SkewedTickClock : public base::DefaultTickClock { public: explicit SkewedTickClock(const base::TimeDelta& delta) : delta_(delta) { } - virtual base::TimeTicks NowTicks() override { + base::TimeTicks NowTicks() override { return DefaultTickClock::NowTicks() + delta_; } private: @@ -96,7 +96,7 @@ class SkewedCastEnvironment : public media::cast::StandaloneCastEnvironment { } protected: - virtual ~SkewedCastEnvironment() {} + ~SkewedCastEnvironment() override {} }; // We log one of these for each call to OnAudioFrame/OnVideoFrame. @@ -239,9 +239,9 @@ class TestPatternReceiver : public media::cast::InProcessReceiver { private: // Invoked by InProcessReceiver for each received audio frame. - virtual void OnAudioFrame(scoped_ptr<media::AudioBus> audio_frame, - const base::TimeTicks& playout_time, - bool is_continuous) override { + void OnAudioFrame(scoped_ptr<media::AudioBus> audio_frame, + const base::TimeTicks& playout_time, + bool is_continuous) override { CHECK(cast_env()->CurrentlyOn(media::cast::CastEnvironment::MAIN)); if (audio_frame->frames() <= 0) { @@ -260,9 +260,9 @@ class TestPatternReceiver : public media::cast::InProcessReceiver { } } - virtual void OnVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, - const base::TimeTicks& render_time, - bool is_continuous) override { + void OnVideoFrame(const scoped_refptr<media::VideoFrame>& video_frame, + const base::TimeTicks& render_time, + bool is_continuous) override { CHECK(cast_env()->CurrentlyOn(media::cast::CastEnvironment::MAIN)); TRACE_EVENT_INSTANT1( @@ -360,7 +360,7 @@ class CastV2PerformanceTest ExtensionApiTest::SetUp(); } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { // Some of the tests may launch http requests through JSON or AJAX // which causes a security error (cross domain request) when the page // is loaded from the local file system ( file:// ). The following switch diff --git a/chrome/browser/extensions/api/chrome_device_permissions_prompt.h b/chrome/browser/extensions/api/chrome_device_permissions_prompt.h index cd8428d..2567275 100644 --- a/chrome/browser/extensions/api/chrome_device_permissions_prompt.h +++ b/chrome/browser/extensions/api/chrome_device_permissions_prompt.h @@ -13,10 +13,10 @@ class ChromeDevicePermissionsPrompt explicit ChromeDevicePermissionsPrompt(content::WebContents* web_contents) : extensions::DevicePermissionsPrompt(web_contents) {} - virtual ~ChromeDevicePermissionsPrompt() {} + ~ChromeDevicePermissionsPrompt() override {} private: - virtual void ShowDialog() override; + void ShowDialog() override; }; #endif // CHROME_BROWSER_EXTENSIONS_API_CHROME_DEVICE_PERMISSIONS_PROMPT_H_ diff --git a/chrome/browser/extensions/api/chrome_extensions_api_client.h b/chrome/browser/extensions/api/chrome_extensions_api_client.h index 24ec7f8..fb5f1aa 100644 --- a/chrome/browser/extensions/api/chrome_extensions_api_client.h +++ b/chrome/browser/extensions/api/chrome_extensions_api_client.h @@ -14,32 +14,30 @@ namespace extensions { class ChromeExtensionsAPIClient : public ExtensionsAPIClient { public: ChromeExtensionsAPIClient(); - virtual ~ChromeExtensionsAPIClient(); + ~ChromeExtensionsAPIClient() override; // ExtensionsApiClient implementation. - virtual void AddAdditionalValueStoreCaches( + void AddAdditionalValueStoreCaches( content::BrowserContext* context, const scoped_refptr<SettingsStorageFactory>& factory, - const scoped_refptr<ObserverListThreadSafe<SettingsObserver> >& observers, + const scoped_refptr<ObserverListThreadSafe<SettingsObserver>>& observers, std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) override; - virtual AppViewGuestDelegate* CreateAppViewGuestDelegate() const override; - virtual ExtensionOptionsGuestDelegate* CreateExtensionOptionsGuestDelegate( + AppViewGuestDelegate* CreateAppViewGuestDelegate() const override; + ExtensionOptionsGuestDelegate* CreateExtensionOptionsGuestDelegate( ExtensionOptionsGuest* guest) const override; - virtual scoped_ptr<MimeHandlerViewGuestDelegate> - CreateMimeHandlerViewGuestDelegate( - MimeHandlerViewGuest* guest) const override; - virtual WebViewGuestDelegate* CreateWebViewGuestDelegate( + scoped_ptr<MimeHandlerViewGuestDelegate> CreateMimeHandlerViewGuestDelegate( + MimeHandlerViewGuest* guest) const override; + WebViewGuestDelegate* CreateWebViewGuestDelegate( WebViewGuest* web_view_guest) const override; - virtual WebViewPermissionHelperDelegate* - CreateWebViewPermissionHelperDelegate( - WebViewPermissionHelper* web_view_permission_helper) const override; - virtual WebRequestEventRouterDelegate* CreateWebRequestEventRouterDelegate() + WebViewPermissionHelperDelegate* CreateWebViewPermissionHelperDelegate( + WebViewPermissionHelper* web_view_permission_helper) const override; + WebRequestEventRouterDelegate* CreateWebRequestEventRouterDelegate() const override; - virtual scoped_refptr<ContentRulesRegistry> CreateContentRulesRegistry( + scoped_refptr<ContentRulesRegistry> CreateContentRulesRegistry( content::BrowserContext* browser_context, RulesCacheDelegate* cache_delegate) const override; - virtual scoped_ptr<DevicePermissionsPrompt> CreateDevicePermissionsPrompt( + scoped_ptr<DevicePermissionsPrompt> CreateDevicePermissionsPrompt( content::WebContents* web_contents) const override; private: diff --git a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h index d5aa3c1..52a369d 100644 --- a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h +++ b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_api.h @@ -55,10 +55,10 @@ class CloudPrintPrivateSetupConnectorFunction CloudPrintPrivateSetupConnectorFunction(); protected: - virtual ~CloudPrintPrivateSetupConnectorFunction(); + ~CloudPrintPrivateSetupConnectorFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; class CloudPrintPrivateGetHostNameFunction @@ -70,10 +70,10 @@ class CloudPrintPrivateGetHostNameFunction CloudPrintPrivateGetHostNameFunction(); protected: - virtual ~CloudPrintPrivateGetHostNameFunction(); + ~CloudPrintPrivateGetHostNameFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; class CloudPrintPrivateGetPrintersFunction @@ -85,13 +85,13 @@ class CloudPrintPrivateGetPrintersFunction CloudPrintPrivateGetPrintersFunction(); protected: - virtual ~CloudPrintPrivateGetPrintersFunction(); + ~CloudPrintPrivateGetPrintersFunction() override; private: void SendResults(const std::vector<std::string>& printers); // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; class CloudPrintPrivateGetClientIdFunction @@ -103,10 +103,10 @@ class CloudPrintPrivateGetClientIdFunction CloudPrintPrivateGetClientIdFunction(); protected: - virtual ~CloudPrintPrivateGetClientIdFunction(); + ~CloudPrintPrivateGetClientIdFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc index e9a5cd6..6088257 100644 --- a/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc +++ b/chrome/browser/extensions/api/cloud_print_private/cloud_print_private_apitest.cc @@ -23,7 +23,7 @@ using ::testing::_; // A base class for tests below. class ExtensionCloudPrintPrivateApiTest : public ExtensionApiTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( switches::kCloudPrintURL, @@ -31,7 +31,7 @@ class ExtensionCloudPrintPrivateApiTest : public ExtensionApiTest { "cloud_print_private"); } - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { // Start up the test server and get us ready for calling the install // API functions. host_resolver()->AddRule("www.cloudprintapp.com", "127.0.0.1"); diff --git a/chrome/browser/extensions/api/command_line_private/command_line_private_api.h b/chrome/browser/extensions/api/command_line_private/command_line_private_api.h index ceed07c..423963e 100644 --- a/chrome/browser/extensions/api/command_line_private/command_line_private_api.h +++ b/chrome/browser/extensions/api/command_line_private/command_line_private_api.h @@ -13,10 +13,10 @@ class CommandLinePrivateHasSwitchFunction : public SyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("commandLinePrivate.hasSwitch", COMMANDLINEPRIVATE_HASSWITCH) protected: - virtual ~CommandLinePrivateHasSwitchFunction() {} + ~CommandLinePrivateHasSwitchFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/command_line_private/command_line_private_apitest.cc b/chrome/browser/extensions/api/command_line_private/command_line_private_apitest.cc index 29bfa5a..36de0ce 100644 --- a/chrome/browser/extensions/api/command_line_private/command_line_private_apitest.cc +++ b/chrome/browser/extensions/api/command_line_private/command_line_private_apitest.cc @@ -12,7 +12,7 @@ const char kTestCommandLineSwitch[] = "command-line-private-api-test-foo"; } // namespace class CommandLinePrivateApiTest : public ExtensionApiTest { - virtual void SetUpCommandLine(base::CommandLine* command_line) override { + void SetUpCommandLine(base::CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitch(kTestCommandLineSwitch); } diff --git a/chrome/browser/extensions/api/commands/command_service.h b/chrome/browser/extensions/api/commands/command_service.h index 7f39b7d..19cde7e 100644 --- a/chrome/browser/extensions/api/commands/command_service.h +++ b/chrome/browser/extensions/api/commands/command_service.h @@ -69,7 +69,7 @@ class CommandService : public BrowserContextKeyedAPI, // Constructs a CommandService object for the given profile. explicit CommandService(content::BrowserContext* context); - virtual ~CommandService(); + ~CommandService() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<CommandService>* GetFactoryInstance(); @@ -179,16 +179,14 @@ class CommandService : public BrowserContextKeyedAPI, static const bool kServiceRedirectedInIncognito = true; // ExtensionRegistryObserver. - virtual void OnExtensionWillBeInstalled( - content::BrowserContext* browser_context, - const Extension* extension, - bool is_update, - bool from_ephemeral, - const std::string& old_name) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, + const Extension* extension, + bool is_update, + bool from_ephemeral, + const std::string& old_name) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const Extension* extension, + extensions::UninstallReason reason) override; // Updates keybindings for a given |extension|'s page action, browser action // and named commands. Assigns new keybindings and removes relinquished diff --git a/chrome/browser/extensions/api/commands/commands.h b/chrome/browser/extensions/api/commands/commands.h index 423049a..9aa38ea 100644 --- a/chrome/browser/extensions/api/commands/commands.h +++ b/chrome/browser/extensions/api/commands/commands.h @@ -8,8 +8,8 @@ #include "chrome/browser/extensions/chrome_extension_function.h" class GetAllCommandsFunction : public ChromeSyncExtensionFunction { - virtual ~GetAllCommandsFunction() {} - virtual bool RunSync() override; + ~GetAllCommandsFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("commands.getAll", COMMANDS_GETALL) }; diff --git a/chrome/browser/extensions/api/content_settings/content_settings_api.h b/chrome/browser/extensions/api/content_settings/content_settings_api.h index fd904a6..8c9d8e1 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_api.h +++ b/chrome/browser/extensions/api/content_settings/content_settings_api.h @@ -21,10 +21,10 @@ class ContentSettingsContentSettingClearFunction DECLARE_EXTENSION_FUNCTION("contentSettings.clear", CONTENTSETTINGS_CLEAR) protected: - virtual ~ContentSettingsContentSettingClearFunction() {} + ~ContentSettingsContentSettingClearFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ContentSettingsContentSettingGetFunction @@ -33,10 +33,10 @@ class ContentSettingsContentSettingGetFunction DECLARE_EXTENSION_FUNCTION("contentSettings.get", CONTENTSETTINGS_GET) protected: - virtual ~ContentSettingsContentSettingGetFunction() {} + ~ContentSettingsContentSettingGetFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ContentSettingsContentSettingSetFunction @@ -45,10 +45,10 @@ class ContentSettingsContentSettingSetFunction DECLARE_EXTENSION_FUNCTION("contentSettings.set", CONTENTSETTINGS_SET) protected: - virtual ~ContentSettingsContentSettingSetFunction() {} + ~ContentSettingsContentSettingSetFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ContentSettingsContentSettingGetResourceIdentifiersFunction @@ -58,10 +58,10 @@ class ContentSettingsContentSettingGetResourceIdentifiersFunction CONTENTSETTINGS_GETRESOURCEIDENTIFIERS) protected: - virtual ~ContentSettingsContentSettingGetResourceIdentifiersFunction() {} + ~ContentSettingsContentSettingGetResourceIdentifiersFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: FRIEND_TEST_ALL_PREFIXES(ExtensionApiTest, diff --git a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc index fe33840..f457a3a 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc +++ b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc @@ -35,12 +35,12 @@ class ExtensionContentSettingsApiTest : public ExtensionApiTest { public: ExtensionContentSettingsApiTest() : profile_(NULL) {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kDisablePluginsDiscovery); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); // The browser might get closed later (and therefore be destroyed), so we @@ -53,7 +53,7 @@ class ExtensionContentSettingsApiTest : public ExtensionApiTest { g_browser_process->AddRefModule(); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { // ReleaseBrowserProcessModule() needs to be called in a message loop, so we // post a task to do it, then run the message loop. base::MessageLoop::current()->PostTask( diff --git a/chrome/browser/extensions/api/content_settings/content_settings_service.h b/chrome/browser/extensions/api/content_settings/content_settings_service.h index 4534dfc..2b7b3e3 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_service.h +++ b/chrome/browser/extensions/api/content_settings/content_settings_service.h @@ -20,7 +20,7 @@ class ContentSettingsService : public BrowserContextKeyedAPI, public ExtensionPrefsObserver { public: explicit ContentSettingsService(content::BrowserContext* context); - virtual ~ContentSettingsService(); + ~ContentSettingsService() override; scoped_refptr<ContentSettingsStore> content_settings_store() const { return content_settings_store_; @@ -34,15 +34,14 @@ class ContentSettingsService : public BrowserContextKeyedAPI, GetFactoryInstance(); // ExtensionPrefsObserver implementation. - virtual void OnExtensionRegistered(const std::string& extension_id, - const base::Time& install_time, - bool is_enabled) override; - virtual void OnExtensionPrefsLoaded(const std::string& extension_id, - const ExtensionPrefs* prefs) override; - virtual void OnExtensionPrefsDeleted(const std::string& extension_id) - override; - virtual void OnExtensionStateChanged(const std::string& extension_id, - bool state) override; + void OnExtensionRegistered(const std::string& extension_id, + const base::Time& install_time, + bool is_enabled) override; + void OnExtensionPrefsLoaded(const std::string& extension_id, + const ExtensionPrefs* prefs) override; + void OnExtensionPrefsDeleted(const std::string& extension_id) override; + void OnExtensionStateChanged(const std::string& extension_id, + bool state) override; private: friend class BrowserContextKeyedAPIFactory<ContentSettingsService>; diff --git a/chrome/browser/extensions/api/context_menus/context_menus_api.h b/chrome/browser/extensions/api/context_menus/context_menus_api.h index a832c32..8c05e68 100644 --- a/chrome/browser/extensions/api/context_menus/context_menus_api.h +++ b/chrome/browser/extensions/api/context_menus/context_menus_api.h @@ -14,10 +14,10 @@ class ContextMenusCreateFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("contextMenus.create", CONTEXTMENUS_CREATE) protected: - virtual ~ContextMenusCreateFunction() {} + ~ContextMenusCreateFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ContextMenusUpdateFunction : public ChromeSyncExtensionFunction { @@ -25,10 +25,10 @@ class ContextMenusUpdateFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("contextMenus.update", CONTEXTMENUS_UPDATE) protected: - virtual ~ContextMenusUpdateFunction() {} + ~ContextMenusUpdateFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ContextMenusRemoveFunction : public ChromeSyncExtensionFunction { @@ -36,10 +36,10 @@ class ContextMenusRemoveFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("contextMenus.remove", CONTEXTMENUS_REMOVE) protected: - virtual ~ContextMenusRemoveFunction() {} + ~ContextMenusRemoveFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ContextMenusRemoveAllFunction : public ChromeSyncExtensionFunction { @@ -47,10 +47,10 @@ class ContextMenusRemoveAllFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("contextMenus.removeAll", CONTEXTMENUS_REMOVEALL) protected: - virtual ~ContextMenusRemoveAllFunction() {} + ~ContextMenusRemoveAllFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/cookies/cookies_api.h b/chrome/browser/extensions/api/cookies/cookies_api.h index 41f33f3..30e2c30 100644 --- a/chrome/browser/extensions/api/cookies/cookies_api.h +++ b/chrome/browser/extensions/api/cookies/cookies_api.h @@ -34,13 +34,13 @@ namespace extensions { class CookiesEventRouter : public content::NotificationObserver { public: explicit CookiesEventRouter(content::BrowserContext* context); - virtual ~CookiesEventRouter(); + ~CookiesEventRouter() override; private: // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Handler for the COOKIE_CHANGED event. The method takes the details of such // an event and constructs a suitable JSON formatted extension event from it. @@ -68,10 +68,10 @@ class CookiesGetFunction : public ChromeAsyncExtensionFunction { CookiesGetFunction(); protected: - virtual ~CookiesGetFunction(); + ~CookiesGetFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void GetCookieOnIOThread(); @@ -91,10 +91,10 @@ class CookiesGetAllFunction : public ChromeAsyncExtensionFunction { CookiesGetAllFunction(); protected: - virtual ~CookiesGetAllFunction(); + ~CookiesGetAllFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void GetAllCookiesOnIOThread(); @@ -114,8 +114,8 @@ class CookiesSetFunction : public ChromeAsyncExtensionFunction { CookiesSetFunction(); protected: - virtual ~CookiesSetFunction(); - virtual bool RunAsync() override; + ~CookiesSetFunction() override; + bool RunAsync() override; private: void SetCookieOnIOThread(); @@ -137,10 +137,10 @@ class CookiesRemoveFunction : public ChromeAsyncExtensionFunction { CookiesRemoveFunction(); protected: - virtual ~CookiesRemoveFunction(); + ~CookiesRemoveFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void RemoveCookieOnIOThread(); @@ -159,27 +159,26 @@ class CookiesGetAllCookieStoresFunction : public ChromeSyncExtensionFunction { COOKIES_GETALLCOOKIESTORES) protected: - virtual ~CookiesGetAllCookieStoresFunction() {} + ~CookiesGetAllCookieStoresFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class CookiesAPI : public BrowserContextKeyedAPI, public extensions::EventRouter::Observer { public: explicit CookiesAPI(content::BrowserContext* context); - virtual ~CookiesAPI(); + ~CookiesAPI() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<CookiesAPI>* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const extensions::EventListenerInfo& details) - override; + void OnListenerAdded(const extensions::EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<CookiesAPI>; diff --git a/chrome/browser/extensions/api/copresence/copresence_api.h b/chrome/browser/extensions/api/copresence/copresence_api.h index 5776fd7..7960132 100644 --- a/chrome/browser/extensions/api/copresence/copresence_api.h +++ b/chrome/browser/extensions/api/copresence/copresence_api.h @@ -28,10 +28,10 @@ class CopresenceService : public BrowserContextKeyedAPI, public copresence::CopresenceDelegate { public: explicit CopresenceService(content::BrowserContext* context); - virtual ~CopresenceService(); + ~CopresenceService() override; // BrowserContextKeyedAPI implementation. - virtual void Shutdown() override; + void Shutdown() override; // These accessors will always return an object (except during shutdown). // If the object doesn't exist, they will create one first. @@ -56,14 +56,13 @@ class CopresenceService : public BrowserContextKeyedAPI, friend class BrowserContextKeyedAPIFactory<CopresenceService>; // CopresenceDelegate implementation - virtual void HandleMessages( - const std::string& app_id, - const std::string& subscription_id, - const std::vector<copresence::Message>& message) override; - virtual net::URLRequestContextGetter* GetRequestContext() const override; - virtual const std::string GetPlatformVersionString() const override; - virtual const std::string GetAPIKey() const override; - virtual copresence::WhispernetClient* GetWhispernetClient() override; + void HandleMessages(const std::string& app_id, + const std::string& subscription_id, + const std::vector<copresence::Message>& message) override; + net::URLRequestContextGetter* GetRequestContext() const override; + const std::string GetPlatformVersionString() const override; + const std::string GetAPIKey() const override; + copresence::WhispernetClient* GetWhispernetClient() override; // BrowserContextKeyedAPI implementation. static const char* service_name() { return "CopresenceService"; } @@ -89,8 +88,8 @@ class CopresenceExecuteFunction : public ChromeUIThreadExtensionFunction { DECLARE_EXTENSION_FUNCTION("copresence.execute", COPRESENCE_EXECUTE); protected: - virtual ~CopresenceExecuteFunction() {} - virtual ExtensionFunction::ResponseAction Run() override; + ~CopresenceExecuteFunction() override {} + ExtensionFunction::ResponseAction Run() override; private: void SendResult(copresence::CopresenceStatus status); @@ -101,8 +100,8 @@ class CopresenceSetApiKeyFunction : public ChromeUIThreadExtensionFunction { DECLARE_EXTENSION_FUNCTION("copresence.setApiKey", COPRESENCE_SETAPIKEY); protected: - virtual ~CopresenceSetApiKeyFunction() {} - virtual ExtensionFunction::ResponseAction Run() override; + ~CopresenceSetApiKeyFunction() override {} + ExtensionFunction::ResponseAction Run() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc b/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc index 95e8070..4e1ffb9 100644 --- a/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc +++ b/chrome/browser/extensions/api/copresence/copresence_api_unittest.cc @@ -71,9 +71,9 @@ class MockCopresenceManager : public CopresenceManager { public: explicit MockCopresenceManager(CopresenceDelegate* delegate) : delegate_(delegate) {} - virtual ~MockCopresenceManager() {} + ~MockCopresenceManager() override {} - virtual void ExecuteReportRequest( + void ExecuteReportRequest( ReportRequest request, const std::string& app_id, const copresence::StatusCallback& status_callback) override { diff --git a/chrome/browser/extensions/api/copresence_private/copresence_private_api.h b/chrome/browser/extensions/api/copresence_private/copresence_private_api.h index 360734d..917b242 100644 --- a/chrome/browser/extensions/api/copresence_private/copresence_private_api.h +++ b/chrome/browser/extensions/api/copresence_private/copresence_private_api.h @@ -16,7 +16,7 @@ namespace extensions { class CopresencePrivateFunction : public ChromeUIThreadExtensionFunction { protected: copresence::WhispernetClient* GetWhispernetClient(); - virtual ~CopresencePrivateFunction() {} + ~CopresencePrivateFunction() override {} }; class CopresencePrivateSendFoundFunction : public CopresencePrivateFunction { @@ -25,8 +25,8 @@ class CopresencePrivateSendFoundFunction : public CopresencePrivateFunction { COPRESENCEPRIVATE_SENDFOUND); protected: - virtual ~CopresencePrivateSendFoundFunction() {} - virtual ExtensionFunction::ResponseAction Run() override; + ~CopresencePrivateSendFoundFunction() override {} + ExtensionFunction::ResponseAction Run() override; }; class CopresencePrivateSendSamplesFunction : public CopresencePrivateFunction { @@ -35,8 +35,8 @@ class CopresencePrivateSendSamplesFunction : public CopresencePrivateFunction { COPRESENCEPRIVATE_SENDSAMPLES); protected: - virtual ~CopresencePrivateSendSamplesFunction() {} - virtual ExtensionFunction::ResponseAction Run() override; + ~CopresencePrivateSendSamplesFunction() override {} + ExtensionFunction::ResponseAction Run() override; }; class CopresencePrivateSendDetectFunction : public CopresencePrivateFunction { @@ -45,8 +45,8 @@ class CopresencePrivateSendDetectFunction : public CopresencePrivateFunction { COPRESENCEPRIVATE_SENDDETECT); protected: - virtual ~CopresencePrivateSendDetectFunction() {} - virtual ExtensionFunction::ResponseAction Run() override; + ~CopresencePrivateSendDetectFunction() override {} + ExtensionFunction::ResponseAction Run() override; }; class CopresencePrivateSendInitializedFunction @@ -56,8 +56,8 @@ class CopresencePrivateSendInitializedFunction COPRESENCEPRIVATE_SENDINITIALIZED); protected: - virtual ~CopresencePrivateSendInitializedFunction() {} - virtual ExtensionFunction::ResponseAction Run() override; + ~CopresencePrivateSendInitializedFunction() override {} + ExtensionFunction::ResponseAction Run() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc index bd1489e..4745a24 100644 --- a/chrome/browser/extensions/api/debugger/debugger_api.cc +++ b/chrome/browser/extensions/api/debugger/debugger_api.cc @@ -84,7 +84,7 @@ class ExtensionDevToolsClientHost : public content::DevToolsAgentHostClient, const Debuggee& debuggee, infobars::InfoBar* infobar); - virtual ~ExtensionDevToolsClientHost(); + ~ExtensionDevToolsClientHost() override; const std::string& extension_id() { return extension_id_; } DevToolsAgentHost* agent_host() { return agent_host_.get(); } @@ -97,26 +97,23 @@ class ExtensionDevToolsClientHost : public content::DevToolsAgentHostClient, void MarkAsDismissed(); // DevToolsAgentHostClient interface. - virtual void AgentHostClosed( - DevToolsAgentHost* agent_host, - bool replaced_with_another_client) override; - virtual void DispatchProtocolMessage( - DevToolsAgentHost* agent_host, - const std::string& message) override; + void AgentHostClosed(DevToolsAgentHost* agent_host, + bool replaced_with_another_client) override; + void DispatchProtocolMessage(DevToolsAgentHost* agent_host, + const std::string& message) override; private: void SendDetachedEvent(); // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // ExtensionRegistryObserver implementation. - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; Profile* profile_; scoped_refptr<DevToolsAgentHost> agent_host_; @@ -171,16 +168,15 @@ class ExtensionDevToolsInfoBarDelegate : public ConfirmInfoBarDelegate { private: explicit ExtensionDevToolsInfoBarDelegate(const std::string& client_name); - virtual ~ExtensionDevToolsInfoBarDelegate(); + ~ExtensionDevToolsInfoBarDelegate() override; // ConfirmInfoBarDelegate: - virtual void InfoBarDismissed() override; - virtual Type GetInfoBarType() const override; - virtual bool ShouldExpireInternal( - const NavigationDetails& details) const override; - virtual base::string16 GetMessageText() const override; - virtual int GetButtons() const override; - virtual bool Cancel() override; + void InfoBarDismissed() override; + Type GetInfoBarType() const override; + bool ShouldExpireInternal(const NavigationDetails& details) const override; + base::string16 GetMessageText() const override; + int GetButtons() const override; + bool Cancel() override; std::string client_name_; ExtensionDevToolsClientHost* client_host_; diff --git a/chrome/browser/extensions/api/debugger/debugger_api.h b/chrome/browser/extensions/api/debugger/debugger_api.h index d1d907c..af2d98f 100644 --- a/chrome/browser/extensions/api/debugger/debugger_api.h +++ b/chrome/browser/extensions/api/debugger/debugger_api.h @@ -35,7 +35,7 @@ class ExtensionDevToolsClientHost; class DebuggerFunction : public ChromeAsyncExtensionFunction { protected: DebuggerFunction(); - virtual ~DebuggerFunction(); + ~DebuggerFunction() override; void FormatErrorMessage(const std::string& format); @@ -55,10 +55,10 @@ class DebuggerAttachFunction : public DebuggerFunction { DebuggerAttachFunction(); protected: - virtual ~DebuggerAttachFunction(); + ~DebuggerAttachFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; // Implements the debugger.detach() extension function. @@ -69,10 +69,10 @@ class DebuggerDetachFunction : public DebuggerFunction { DebuggerDetachFunction(); protected: - virtual ~DebuggerDetachFunction(); + ~DebuggerDetachFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; // Implements the debugger.sendCommand() extension function. @@ -84,10 +84,10 @@ class DebuggerSendCommandFunction : public DebuggerFunction { void SendResponseBody(base::DictionaryValue* result); protected: - virtual ~DebuggerSendCommandFunction(); + ~DebuggerSendCommandFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; // Implements the debugger.getTargets() extension function. @@ -98,10 +98,10 @@ class DebuggerGetTargetsFunction : public DebuggerFunction { DebuggerGetTargetsFunction(); protected: - virtual ~DebuggerGetTargetsFunction(); + ~DebuggerGetTargetsFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void SendTargetList(const std::vector<DevToolsTargetImpl*>& target_list); diff --git a/chrome/browser/extensions/api/debugger/debugger_apitest.cc b/chrome/browser/extensions/api/debugger/debugger_apitest.cc index 04ce863..77e646f 100644 --- a/chrome/browser/extensions/api/debugger/debugger_apitest.cc +++ b/chrome/browser/extensions/api/debugger/debugger_apitest.cc @@ -29,8 +29,8 @@ class DebuggerApiTest : public ExtensionApiTest { protected: virtual ~DebuggerApiTest() {} - virtual void SetUpCommandLine(base::CommandLine* command_line) override; - virtual void SetUpOnMainThread() override; + void SetUpCommandLine(base::CommandLine* command_line) override; + void SetUpOnMainThread() override; // Run the attach function. If |expected_error| is not empty, then the // function should fail with the error. Otherwise, the function is expected diff --git a/chrome/browser/extensions/api/debugger/debugger_extension_apitest.cc b/chrome/browser/extensions/api/debugger/debugger_extension_apitest.cc index bb29baf..fca215b 100644 --- a/chrome/browser/extensions/api/debugger/debugger_extension_apitest.cc +++ b/chrome/browser/extensions/api/debugger/debugger_extension_apitest.cc @@ -9,7 +9,7 @@ class ExtensionApiTestWithSwitch : public ExtensionApiTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kSilentDebuggerExtensionAPI); command_line->AppendSwitch(extensions::switches::kExtensionsOnChromeURLs); diff --git a/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h b/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h index a792ce4..e35c396 100644 --- a/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h +++ b/chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h @@ -70,36 +70,34 @@ class ChromeContentRulesRegistry : public ContentRulesRegistry, // ChromeContentRulesRegistry implementation: // Applies all content rules given an update (CSS match change or // page navigation, for now) from the renderer. - virtual void Apply( - content::WebContents* contents, - const std::vector<std::string>& matching_css_selectors) override; + void Apply(content::WebContents* contents, + const std::vector<std::string>& matching_css_selectors) override; // Applies all content rules given that a tab was just navigated. - virtual void DidNavigateMainFrame( + void DidNavigateMainFrame( content::WebContents* tab, const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) override; // Implementation of RulesRegistry: - virtual std::string AddRulesImpl( + std::string AddRulesImpl( const std::string& extension_id, - const std::vector<linked_ptr<RulesRegistry::Rule> >& rules) override; - virtual std::string RemoveRulesImpl( + const std::vector<linked_ptr<RulesRegistry::Rule>>& rules) override; + std::string RemoveRulesImpl( const std::string& extension_id, const std::vector<std::string>& rule_identifiers) override; - virtual std::string RemoveAllRulesImpl( - const std::string& extension_id) override; + std::string RemoveAllRulesImpl(const std::string& extension_id) override; // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Returns true if this object retains no allocated data. Only for debugging. bool IsEmpty() const; protected: - virtual ~ChromeContentRulesRegistry(); + ~ChromeContentRulesRegistry() override; // Virtual for testing: virtual base::Time GetExtensionInstallationTime( diff --git a/chrome/browser/extensions/api/declarative_content/content_action.cc b/chrome/browser/extensions/api/declarative_content/content_action.cc index 154af37..4e535b7 100644 --- a/chrome/browser/extensions/api/declarative_content/content_action.cc +++ b/chrome/browser/extensions/api/declarative_content/content_action.cc @@ -74,10 +74,10 @@ class ShowPageAction : public ContentAction { } // Implementation of ContentAction: - virtual Type GetType() const override { return ACTION_SHOW_PAGE_ACTION; } - virtual void Apply(const std::string& extension_id, - const base::Time& extension_install_time, - ApplyInfo* apply_info) const override { + Type GetType() const override { return ACTION_SHOW_PAGE_ACTION; } + void Apply(const std::string& extension_id, + const base::Time& extension_install_time, + ApplyInfo* apply_info) const override { ExtensionAction* action = GetPageAction(apply_info->browser_context, extension_id); action->DeclarativeShow(ExtensionTabUtil::GetTabId(apply_info->tab)); @@ -85,12 +85,12 @@ class ShowPageAction : public ContentAction { action, apply_info->tab, apply_info->browser_context); } // The page action is already showing, so nothing needs to be done here. - virtual void Reapply(const std::string& extension_id, - const base::Time& extension_install_time, - ApplyInfo* apply_info) const override {} - virtual void Revert(const std::string& extension_id, - const base::Time& extension_install_time, - ApplyInfo* apply_info) const override { + void Reapply(const std::string& extension_id, + const base::Time& extension_install_time, + ApplyInfo* apply_info) const override {} + void Revert(const std::string& extension_id, + const base::Time& extension_install_time, + ApplyInfo* apply_info) const override { if (ExtensionAction* action = GetPageAction(apply_info->browser_context, extension_id)) { action->UndoDeclarativeShow(ExtensionTabUtil::GetTabId(apply_info->tab)); @@ -111,7 +111,7 @@ class ShowPageAction : public ContentAction { return ExtensionActionManager::Get(browser_context) ->GetPageAction(*extension); } - virtual ~ShowPageAction() {} + ~ShowPageAction() override {} DISALLOW_COPY_AND_ASSIGN(ShowPageAction); }; @@ -130,10 +130,10 @@ class SetIcon : public ContentAction { bool* bad_message); // Implementation of ContentAction: - virtual Type GetType() const override { return ACTION_SET_ICON; } - virtual void Apply(const std::string& extension_id, - const base::Time& extension_install_time, - ApplyInfo* apply_info) const override { + Type GetType() const override { return ACTION_SET_ICON; } + void Apply(const std::string& extension_id, + const base::Time& extension_install_time, + ApplyInfo* apply_info) const override { Profile* profile = Profile::FromBrowserContext(apply_info->browser_context); ExtensionAction* action = GetExtensionAction(profile, extension_id); if (action) { @@ -145,13 +145,13 @@ class SetIcon : public ContentAction { } } - virtual void Reapply(const std::string& extension_id, - const base::Time& extension_install_time, - ApplyInfo* apply_info) const override {} + void Reapply(const std::string& extension_id, + const base::Time& extension_install_time, + ApplyInfo* apply_info) const override {} - virtual void Revert(const std::string& extension_id, - const base::Time& extension_install_time, - ApplyInfo* apply_info) const override { + void Revert(const std::string& extension_id, + const base::Time& extension_install_time, + ApplyInfo* apply_info) const override { Profile* profile = Profile::FromBrowserContext(apply_info->browser_context); ExtensionAction* action = GetExtensionAction(profile, extension_id); if (action) { @@ -183,7 +183,7 @@ class SetIcon : public ContentAction { } return NULL; } - virtual ~SetIcon() {} + ~SetIcon() override {} gfx::Image icon_; ActionInfo::Type action_type_; diff --git a/chrome/browser/extensions/api/declarative_content/content_action.h b/chrome/browser/extensions/api/declarative_content/content_action.h index b10412d..dc39431 100644 --- a/chrome/browser/extensions/api/declarative_content/content_action.h +++ b/chrome/browser/extensions/api/declarative_content/content_action.h @@ -122,19 +122,19 @@ class RequestContentScript : public ContentAction { ScriptData* script_data); // Implementation of ContentAction: - virtual Type GetType() const override; + Type GetType() const override; - virtual void Apply(const std::string& extension_id, - const base::Time& extension_install_time, - ApplyInfo* apply_info) const override; + void Apply(const std::string& extension_id, + const base::Time& extension_install_time, + ApplyInfo* apply_info) const override; - virtual void Reapply(const std::string& extension_id, - const base::Time& extension_install_time, - ApplyInfo* apply_info) const override; + void Reapply(const std::string& extension_id, + const base::Time& extension_install_time, + ApplyInfo* apply_info) const override; - virtual void Revert(const std::string& extension_id, - const base::Time& extension_install_time, - ApplyInfo* apply_info) const override; + void Revert(const std::string& extension_id, + const base::Time& extension_install_time, + ApplyInfo* apply_info) const override; private: void InitScript(const Extension* extension, const ScriptData& script_data); @@ -144,7 +144,7 @@ class RequestContentScript : public ContentAction { master_->AddScript(script_); } - virtual ~RequestContentScript(); + ~RequestContentScript() override; void InstructRenderProcessToInject(content::WebContents* contents, const std::string& extension_id) const; diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc index 369e35f..391ffa30 100644 --- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc +++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry_unittest.cc @@ -70,11 +70,9 @@ class TestWebRequestRulesRegistry : public WebRequestRulesRegistry { } protected: - virtual ~TestWebRequestRulesRegistry() {} + ~TestWebRequestRulesRegistry() override {} - virtual void ClearCacheOnNavigation() override { - ++num_clear_cache_calls_; - } + void ClearCacheOnNavigation() override { ++num_clear_cache_calls_; } private: int num_clear_cache_calls_; diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.h b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.h index a1ff2a2..b76b5c4 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.h +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.h @@ -46,13 +46,13 @@ class DesktopCaptureChooseDesktopMediaFunction void Cancel(); private: - virtual ~DesktopCaptureChooseDesktopMediaFunction(); + ~DesktopCaptureChooseDesktopMediaFunction() override; // ExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; // content::WebContentsObserver overrides. - virtual void WebContentsDestroyed() override; + void WebContentsDestroyed() override; void OnPickerDialogResults(content::DesktopMediaID source); @@ -73,10 +73,10 @@ class DesktopCaptureCancelChooseDesktopMediaFunction DesktopCaptureCancelChooseDesktopMediaFunction(); private: - virtual ~DesktopCaptureCancelChooseDesktopMediaFunction(); + ~DesktopCaptureCancelChooseDesktopMediaFunction() override; // ExtensionFunction overrides. - virtual bool RunSync() override; + bool RunSync() override; }; class DesktopCaptureRequestsRegistry { diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc index 479c496..f071377 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc @@ -42,18 +42,16 @@ class FakeDesktopMediaPicker : public DesktopMediaPicker { weak_factory_(this) { expectation_->picker_created = true; } - virtual ~FakeDesktopMediaPicker() { - expectation_->picker_deleted = true; - } + ~FakeDesktopMediaPicker() override { expectation_->picker_deleted = true; } // DesktopMediaPicker interface. - virtual void Show(content::WebContents* web_contents, - gfx::NativeWindow context, - gfx::NativeWindow parent, - const base::string16& app_name, - const base::string16& target_name, - scoped_ptr<DesktopMediaList> model, - const DoneCallback& done_callback) override { + void Show(content::WebContents* web_contents, + gfx::NativeWindow context, + gfx::NativeWindow parent, + const base::string16& app_name, + const base::string16& target_name, + scoped_ptr<DesktopMediaList> model, + const DoneCallback& done_callback) override { if (!expectation_->cancelled) { // Post a task to call the callback asynchronously. base::ThreadTaskRunnerHandle::Get()->PostTask( @@ -84,7 +82,7 @@ class FakeDesktopMediaPickerFactory : public DesktopCaptureChooseDesktopMediaFunction::PickerFactory { public: FakeDesktopMediaPickerFactory() {} - virtual ~FakeDesktopMediaPickerFactory() {} + ~FakeDesktopMediaPickerFactory() override {} void SetTestFlags(TestFlags* test_flags, int tests_count) { test_flags_ = test_flags; @@ -93,9 +91,8 @@ class FakeDesktopMediaPickerFactory : } // DesktopCaptureChooseDesktopMediaFunction::PickerFactory interface. - virtual scoped_ptr<DesktopMediaList> CreateModel( - bool show_screens, - bool show_windows) override { + scoped_ptr<DesktopMediaList> CreateModel(bool show_screens, + bool show_windows) override { EXPECT_LE(current_test_, tests_count_); if (current_test_ >= tests_count_) return scoped_ptr<DesktopMediaList>(); @@ -104,7 +101,7 @@ class FakeDesktopMediaPickerFactory : return scoped_ptr<DesktopMediaList>(new FakeDesktopMediaList()); } - virtual scoped_ptr<DesktopMediaPicker> CreatePicker() override { + scoped_ptr<DesktopMediaPicker> CreatePicker() override { EXPECT_LE(current_test_, tests_count_); if (current_test_ >= tests_count_) return scoped_ptr<DesktopMediaPicker>(); diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h index 9a6d08f..41bfff9 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_api.h +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h @@ -63,7 +63,7 @@ class DeveloperPrivateEventRouter : public content::NotificationObserver, public ErrorConsole::Observer { public: explicit DeveloperPrivateEventRouter(Profile* profile); - virtual ~DeveloperPrivateEventRouter(); + ~DeveloperPrivateEventRouter() override; // Add or remove an ID to the list of extensions subscribed to events. void AddExtensionId(const std::string& extension_id); @@ -71,30 +71,27 @@ class DeveloperPrivateEventRouter : public content::NotificationObserver, private: // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; - virtual void OnExtensionWillBeInstalled( - content::BrowserContext* browser_context, - const Extension* extension, - bool is_update, - bool from_ephemeral, - const std::string& old_name) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; + void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, + const Extension* extension, + bool is_update, + bool from_ephemeral, + const std::string& old_name) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const Extension* extension, + extensions::UninstallReason reason) override; // ErrorConsole::Observer implementation. - virtual void OnErrorAdded(const ExtensionError* error) override; + void OnErrorAdded(const ExtensionError* error) override; content::NotificationRegistrar registrar_; @@ -126,7 +123,7 @@ class DeveloperPrivateAPI : public BrowserContextKeyedAPI, static DeveloperPrivateAPI* Get(content::BrowserContext* context); explicit DeveloperPrivateAPI(content::BrowserContext* context); - virtual ~DeveloperPrivateAPI(); + ~DeveloperPrivateAPI() override; void SetLastUnpackedDirectory(const base::FilePath& path); @@ -135,11 +132,11 @@ class DeveloperPrivateAPI : public BrowserContextKeyedAPI, } // KeyedService implementation - virtual void Shutdown() override; + void Shutdown() override; // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<DeveloperPrivateAPI>; @@ -171,10 +168,10 @@ class DeveloperPrivateAutoUpdateFunction : public ChromeSyncExtensionFunction { DEVELOPERPRIVATE_AUTOUPDATE) protected: - virtual ~DeveloperPrivateAutoUpdateFunction(); + ~DeveloperPrivateAutoUpdateFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class DeveloperPrivateGetItemsInfoFunction @@ -184,10 +181,10 @@ class DeveloperPrivateGetItemsInfoFunction DEVELOPERPRIVATE_GETITEMSINFO) protected: - virtual ~DeveloperPrivateGetItemsInfoFunction(); + ~DeveloperPrivateGetItemsInfoFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: scoped_ptr<developer::ItemInfo> CreateItemInfo(const Extension& item, @@ -224,10 +221,10 @@ class DeveloperPrivateInspectFunction : public ChromeSyncExtensionFunction { DEVELOPERPRIVATE_INSPECT) protected: - virtual ~DeveloperPrivateInspectFunction(); + ~DeveloperPrivateInspectFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class DeveloperPrivateAllowFileAccessFunction @@ -237,10 +234,10 @@ class DeveloperPrivateAllowFileAccessFunction DEVELOPERPRIVATE_ALLOWFILEACCESS); protected: - virtual ~DeveloperPrivateAllowFileAccessFunction(); + ~DeveloperPrivateAllowFileAccessFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class DeveloperPrivateAllowIncognitoFunction @@ -250,10 +247,10 @@ class DeveloperPrivateAllowIncognitoFunction DEVELOPERPRIVATE_ALLOWINCOGNITO); protected: - virtual ~DeveloperPrivateAllowIncognitoFunction(); + ~DeveloperPrivateAllowIncognitoFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class DeveloperPrivateReloadFunction : public ChromeSyncExtensionFunction { @@ -262,10 +259,10 @@ class DeveloperPrivateReloadFunction : public ChromeSyncExtensionFunction { DEVELOPERPRIVATE_RELOAD); protected: - virtual ~DeveloperPrivateReloadFunction(); + ~DeveloperPrivateReloadFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class DeveloperPrivateShowPermissionsDialogFunction @@ -277,14 +274,14 @@ class DeveloperPrivateShowPermissionsDialogFunction DeveloperPrivateShowPermissionsDialogFunction(); protected: - virtual ~DeveloperPrivateShowPermissionsDialogFunction(); + ~DeveloperPrivateShowPermissionsDialogFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; // Overridden from ExtensionInstallPrompt::Delegate - virtual void InstallUIProceed() override; - virtual void InstallUIAbort(bool user_initiated) override; + void InstallUIProceed() override; + void InstallUIAbort(bool user_initiated) override; scoped_ptr<ExtensionInstallPrompt> prompt_; std::string extension_id_; @@ -300,13 +297,13 @@ class DeveloperPrivateEnableFunction DeveloperPrivateEnableFunction(); protected: - virtual ~DeveloperPrivateEnableFunction(); + ~DeveloperPrivateEnableFunction() override; // Callback for requirements checker. void OnRequirementsChecked(const std::string& extension_id, std::vector<std::string> requirements_errors); // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; private: scoped_ptr<RequirementsChecker> requirements_checker_; @@ -315,8 +312,8 @@ class DeveloperPrivateEnableFunction class DeveloperPrivateChooseEntryFunction : public ChromeAsyncExtensionFunction, public EntryPickerClient { protected: - virtual ~DeveloperPrivateChooseEntryFunction(); - virtual bool RunAsync() override; + ~DeveloperPrivateChooseEntryFunction() override; + bool RunAsync() override; bool ShowPicker(ui::SelectFileDialog::Type picker_type, const base::FilePath& last_directory, const base::string16& select_title, @@ -336,12 +333,12 @@ class DeveloperPrivateLoadUnpackedFunction DEVELOPERPRIVATE_LOADUNPACKED); protected: - virtual ~DeveloperPrivateLoadUnpackedFunction(); - virtual bool RunAsync() override; + ~DeveloperPrivateLoadUnpackedFunction() override; + bool RunAsync() override; // EntryPickerCLient implementation. - virtual void FileSelected(const base::FilePath& path) override; - virtual void FileSelectionCanceled() override; + void FileSelected(const base::FilePath& path) override; + void FileSelectionCanceled() override; }; class DeveloperPrivateChoosePathFunction @@ -351,12 +348,12 @@ class DeveloperPrivateChoosePathFunction DEVELOPERPRIVATE_CHOOSEPATH); protected: - virtual ~DeveloperPrivateChoosePathFunction(); - virtual bool RunAsync() override; + ~DeveloperPrivateChoosePathFunction() override; + bool RunAsync() override; // EntryPickerClient functions. - virtual void FileSelected(const base::FilePath& path) override; - virtual void FileSelectionCanceled() override; + void FileSelected(const base::FilePath& path) override; + void FileSelectionCanceled() override; }; class DeveloperPrivatePackDirectoryFunction @@ -370,14 +367,14 @@ class DeveloperPrivatePackDirectoryFunction DeveloperPrivatePackDirectoryFunction(); // ExtensionPackJob::Client implementation. - virtual void OnPackSuccess(const base::FilePath& crx_file, - const base::FilePath& key_file) override; - virtual void OnPackFailure(const std::string& error, - ExtensionCreator::ErrorType error_type) override; + void OnPackSuccess(const base::FilePath& crx_file, + const base::FilePath& key_file) override; + void OnPackFailure(const std::string& error, + ExtensionCreator::ErrorType error_type) override; protected: - virtual ~DeveloperPrivatePackDirectoryFunction(); - virtual bool RunAsync() override; + ~DeveloperPrivatePackDirectoryFunction() override; + bool RunAsync() override; private: scoped_refptr<PackExtensionJob> pack_job_; @@ -392,10 +389,10 @@ class DeveloperPrivateIsProfileManagedFunction DEVELOPERPRIVATE_ISPROFILEMANAGED); protected: - virtual ~DeveloperPrivateIsProfileManagedFunction(); + ~DeveloperPrivateIsProfileManagedFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class DeveloperPrivateLoadDirectoryFunction @@ -407,10 +404,10 @@ class DeveloperPrivateLoadDirectoryFunction DeveloperPrivateLoadDirectoryFunction(); protected: - virtual ~DeveloperPrivateLoadDirectoryFunction(); + ~DeveloperPrivateLoadDirectoryFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; bool LoadByFileSystemAPI(const storage::FileSystemURL& directory_url); @@ -463,10 +460,10 @@ class DeveloperPrivateRequestFileSourceFunction DeveloperPrivateRequestFileSourceFunction(); protected: - virtual ~DeveloperPrivateRequestFileSourceFunction(); + ~DeveloperPrivateRequestFileSourceFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void LaunchCallback(const base::DictionaryValue& results); @@ -481,10 +478,10 @@ class DeveloperPrivateOpenDevToolsFunction DeveloperPrivateOpenDevToolsFunction(); protected: - virtual ~DeveloperPrivateOpenDevToolsFunction(); + ~DeveloperPrivateOpenDevToolsFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; } // namespace api diff --git a/chrome/browser/extensions/api/developer_private/entry_picker.h b/chrome/browser/extensions/api/developer_private/entry_picker.h index b5afbde..5fafbc6 100644 --- a/chrome/browser/extensions/api/developer_private/entry_picker.h +++ b/chrome/browser/extensions/api/developer_private/entry_picker.h @@ -39,15 +39,15 @@ class EntryPicker : public ui::SelectFileDialog::Listener { static void StopSkippingPickerForTest(); protected: - virtual ~EntryPicker(); + ~EntryPicker() override; private: // ui::SelectFileDialog::Listener implementation. - virtual void FileSelected(const base::FilePath& path, - int index, - void* params) override; + void FileSelected(const base::FilePath& path, + int index, + void* params) override; - virtual void FileSelectionCanceled(void* params) override; + void FileSelectionCanceled(void* params) override; scoped_refptr<ui::SelectFileDialog> select_file_dialog_; EntryPickerClient* client_; diff --git a/chrome/browser/extensions/api/dial/dial_api.h b/chrome/browser/extensions/api/dial/dial_api.h index 3305253..6548a72 100644 --- a/chrome/browser/extensions/api/dial/dial_api.h +++ b/chrome/browser/extensions/api/dial/dial_api.h @@ -37,19 +37,18 @@ class DialAPI : public RefcountedKeyedService, void SendErrorOnUIThread(const DialRegistry::DialErrorCode type); private: - virtual ~DialAPI(); + ~DialAPI() override; // RefcountedKeyedService: - virtual void ShutdownOnUIThread() override; + void ShutdownOnUIThread() override; // EventRouter::Observer: - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; // DialRegistry::Observer: - virtual void OnDialDeviceEvent( - const DialRegistry::DeviceList& devices) override; - virtual void OnDialError(DialRegistry::DialErrorCode type) override; + void OnDialDeviceEvent(const DialRegistry::DeviceList& devices) override; + void OnDialError(DialRegistry::DialErrorCode type) override; // Methods to notify the DialRegistry on the correct thread of new/removed // listeners. @@ -75,12 +74,12 @@ class DialDiscoverNowFunction : public AsyncApiFunction { DialDiscoverNowFunction(); protected: - virtual ~DialDiscoverNowFunction() {} + ~DialDiscoverNowFunction() override {} // AsyncApiFunction: - virtual bool Prepare() override; - virtual void Work() override; - virtual bool Respond() override; + bool Prepare() override; + void Work() override; + bool Respond() override; private: DECLARE_EXTENSION_FUNCTION("dial.discoverNow", DIAL_DISCOVERNOW) diff --git a/chrome/browser/extensions/api/dial/dial_api_factory.h b/chrome/browser/extensions/api/dial/dial_api_factory.h index 7cf6dab..9bfc05d 100644 --- a/chrome/browser/extensions/api/dial/dial_api_factory.h +++ b/chrome/browser/extensions/api/dial/dial_api_factory.h @@ -23,13 +23,13 @@ class DialAPIFactory : public RefcountedBrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<DialAPIFactory>; DialAPIFactory(); - virtual ~DialAPIFactory(); + ~DialAPIFactory() override; // BrowserContextKeyedServiceFactory: - virtual scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( + scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsNULLWhileTesting() const override; DISALLOW_COPY_AND_ASSIGN(DialAPIFactory); }; diff --git a/chrome/browser/extensions/api/dial/dial_apitest.cc b/chrome/browser/extensions/api/dial/dial_apitest.cc index f2c0e75..3dceb944 100644 --- a/chrome/browser/extensions/api/dial/dial_apitest.cc +++ b/chrome/browser/extensions/api/dial/dial_apitest.cc @@ -25,7 +25,7 @@ class DialAPITest : public ExtensionApiTest { public: DialAPITest() {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( extensions::switches::kWhitelistedExtensionID, diff --git a/chrome/browser/extensions/api/dial/dial_registry.h b/chrome/browser/extensions/api/dial/dial_registry.h index ac474c5e..83caa38 100644 --- a/chrome/browser/extensions/api/dial/dial_registry.h +++ b/chrome/browser/extensions/api/dial/dial_registry.h @@ -58,7 +58,7 @@ class DialRegistry : public DialService::Observer, const base::TimeDelta& expiration, const size_t max_devices); - virtual ~DialRegistry(); + ~DialRegistry() override; // Called by the DIAL API when event listeners are added or removed. The dial // service is started after the first listener is added and stopped after the @@ -88,15 +88,15 @@ class DialRegistry : public DialService::Observer, typedef std::map<std::string, linked_ptr<DialDeviceData> > DeviceByLabelMap; // DialService::Observer: - virtual void OnDiscoveryRequest(DialService* service) override; - virtual void OnDeviceDiscovered(DialService* service, - const DialDeviceData& device) override; - virtual void OnDiscoveryFinished(DialService* service) override; - virtual void OnError(DialService* service, - const DialService::DialServiceErrorCode& code) override; + void OnDiscoveryRequest(DialService* service) override; + void OnDeviceDiscovered(DialService* service, + const DialDeviceData& device) override; + void OnDiscoveryFinished(DialService* service) override; + void OnError(DialService* service, + const DialService::DialServiceErrorCode& code) override; // net::NetworkChangeObserver: - virtual void OnNetworkChanged( + void OnNetworkChanged( net::NetworkChangeNotifier::ConnectionType type) override; // Starts and stops periodic discovery. Periodic discovery is done when there diff --git a/chrome/browser/extensions/api/dial/dial_registry_unittest.cc b/chrome/browser/extensions/api/dial/dial_registry_unittest.cc index 608cfe4..6d5a0b4 100644 --- a/chrome/browser/extensions/api/dial/dial_registry_unittest.cc +++ b/chrome/browser/extensions/api/dial/dial_registry_unittest.cc @@ -48,7 +48,7 @@ class MockDialRegistry : public DialRegistry { time_ = Time::Now(); } - virtual ~MockDialRegistry() { + ~MockDialRegistry() override { // Don't let the DialRegistry delete this. DialService* tmp = dial_.release(); if (tmp != NULL) @@ -64,15 +64,11 @@ class MockDialRegistry : public DialRegistry { Time time_; protected: - virtual base::Time Now() const override { - return time_; - } + base::Time Now() const override { return time_; } - virtual DialService* CreateDialService() override { - return &mock_service_; - } + DialService* CreateDialService() override { return &mock_service_; } - virtual void ClearDialService() override { + void ClearDialService() override { // Release the pointer but don't delete the object because the test owns it. CHECK_EQ(&mock_service_, dial_.release()); } diff --git a/chrome/browser/extensions/api/dial/dial_service.h b/chrome/browser/extensions/api/dial/dial_service.h index 3f84732..b70ca46 100644 --- a/chrome/browser/extensions/api/dial/dial_service.h +++ b/chrome/browser/extensions/api/dial/dial_service.h @@ -102,13 +102,13 @@ class DialServiceImpl : public DialService, public base::SupportsWeakPtr<DialServiceImpl> { public: explicit DialServiceImpl(net::NetLog* net_log); - virtual ~DialServiceImpl(); + ~DialServiceImpl() override; // DialService implementation - virtual bool Discover() override; - virtual void AddObserver(Observer* observer) override; - virtual void RemoveObserver(Observer* observer) override; - virtual bool HasObserver(Observer* observer) override; + bool Discover() override; + void AddObserver(Observer* observer) override; + void RemoveObserver(Observer* observer) override; + bool HasObserver(Observer* observer) override; private: // Represents a socket binding to a single network interface. diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc index 47f7fa5..84e1842 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc @@ -297,12 +297,13 @@ class DownloadFileIconExtractorImpl : public DownloadFileIconExtractor { public: DownloadFileIconExtractorImpl() {} - virtual ~DownloadFileIconExtractorImpl() {} + ~DownloadFileIconExtractorImpl() override {} + + bool ExtractIconURLForPath(const base::FilePath& path, + float scale, + IconLoader::IconSize icon_size, + IconURLCallback callback) override; - virtual bool ExtractIconURLForPath(const base::FilePath& path, - float scale, - IconLoader::IconSize icon_size, - IconURLCallback callback) override; private: void OnIconLoadComplete( float scale, const IconURLCallback& callback, gfx::Image* icon); @@ -599,7 +600,7 @@ class ExtensionDownloadsEventRouterData : public base::SupportsUserData::Data { download_item->SetUserData(kKey, this); } - virtual ~ExtensionDownloadsEventRouterData() { + ~ExtensionDownloadsEventRouterData() override { if (updated_ > 0) { UMA_HISTOGRAM_PERCENTAGE("Download.OnChanged", (changed_fired_ * 100 / updated_)); @@ -889,11 +890,9 @@ class ManagerDestructionObserver : public DownloadManager::Observer { manager_->AddObserver(this); } - virtual ~ManagerDestructionObserver() { - manager_->RemoveObserver(this); - } + ~ManagerDestructionObserver() override { manager_->RemoveObserver(this); } - virtual void ManagerGoingDown(DownloadManager* manager) override { + void ManagerGoingDown(DownloadManager* manager) override { manager_file_existence_last_checked_->erase(manager); if (manager_file_existence_last_checked_->size() == 0) { delete manager_file_existence_last_checked_; diff --git a/chrome/browser/extensions/api/downloads/downloads_api.h b/chrome/browser/extensions/api/downloads/downloads_api.h index 6f7fa73..96d2afa 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api.h +++ b/chrome/browser/extensions/api/downloads/downloads_api.h @@ -94,10 +94,10 @@ class DownloadsDownloadFunction : public ChromeAsyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.download", DOWNLOADS_DOWNLOAD) DownloadsDownloadFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~DownloadsDownloadFunction(); + ~DownloadsDownloadFunction() override; private: void OnStarted(const base::FilePath& creator_suggested_filename, @@ -113,10 +113,10 @@ class DownloadsSearchFunction : public ChromeSyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.search", DOWNLOADS_SEARCH) DownloadsSearchFunction(); - virtual bool RunSync() override; + bool RunSync() override; protected: - virtual ~DownloadsSearchFunction(); + ~DownloadsSearchFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsSearchFunction); @@ -126,10 +126,10 @@ class DownloadsPauseFunction : public ChromeSyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.pause", DOWNLOADS_PAUSE) DownloadsPauseFunction(); - virtual bool RunSync() override; + bool RunSync() override; protected: - virtual ~DownloadsPauseFunction(); + ~DownloadsPauseFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsPauseFunction); @@ -139,10 +139,10 @@ class DownloadsResumeFunction : public ChromeSyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.resume", DOWNLOADS_RESUME) DownloadsResumeFunction(); - virtual bool RunSync() override; + bool RunSync() override; protected: - virtual ~DownloadsResumeFunction(); + ~DownloadsResumeFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsResumeFunction); @@ -152,10 +152,10 @@ class DownloadsCancelFunction : public ChromeSyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.cancel", DOWNLOADS_CANCEL) DownloadsCancelFunction(); - virtual bool RunSync() override; + bool RunSync() override; protected: - virtual ~DownloadsCancelFunction(); + ~DownloadsCancelFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsCancelFunction); @@ -165,10 +165,10 @@ class DownloadsEraseFunction : public ChromeSyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.erase", DOWNLOADS_ERASE) DownloadsEraseFunction(); - virtual bool RunSync() override; + bool RunSync() override; protected: - virtual ~DownloadsEraseFunction(); + ~DownloadsEraseFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsEraseFunction); @@ -178,10 +178,10 @@ class DownloadsRemoveFileFunction : public ChromeAsyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.removeFile", DOWNLOADS_REMOVEFILE) DownloadsRemoveFileFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~DownloadsRemoveFileFunction(); + ~DownloadsRemoveFileFunction() override; private: void Done(bool success); @@ -199,10 +199,10 @@ class DownloadsAcceptDangerFunction : public ChromeAsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("downloads.acceptDanger", DOWNLOADS_ACCEPTDANGER) DownloadsAcceptDangerFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~DownloadsAcceptDangerFunction(); + ~DownloadsAcceptDangerFunction() override; void DangerPromptCallback(int download_id, DownloadDangerPrompt::Action action); @@ -217,10 +217,10 @@ class DownloadsShowFunction : public ChromeAsyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.show", DOWNLOADS_SHOW) DownloadsShowFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~DownloadsShowFunction(); + ~DownloadsShowFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsShowFunction); @@ -231,10 +231,10 @@ class DownloadsShowDefaultFolderFunction : public ChromeAsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION( "downloads.showDefaultFolder", DOWNLOADS_SHOWDEFAULTFOLDER) DownloadsShowDefaultFolderFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~DownloadsShowDefaultFolderFunction(); + ~DownloadsShowDefaultFolderFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsShowDefaultFolderFunction); @@ -244,10 +244,10 @@ class DownloadsOpenFunction : public ChromeSyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.open", DOWNLOADS_OPEN) DownloadsOpenFunction(); - virtual bool RunSync() override; + bool RunSync() override; protected: - virtual ~DownloadsOpenFunction(); + ~DownloadsOpenFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsOpenFunction); @@ -258,10 +258,10 @@ class DownloadsSetShelfEnabledFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("downloads.setShelfEnabled", DOWNLOADS_SETSHELFENABLED) DownloadsSetShelfEnabledFunction(); - virtual bool RunSync() override; + bool RunSync() override; protected: - virtual ~DownloadsSetShelfEnabledFunction(); + ~DownloadsSetShelfEnabledFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsSetShelfEnabledFunction); @@ -271,10 +271,10 @@ class DownloadsDragFunction : public ChromeAsyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.drag", DOWNLOADS_DRAG) DownloadsDragFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~DownloadsDragFunction(); + ~DownloadsDragFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsDragFunction); @@ -284,11 +284,11 @@ class DownloadsGetFileIconFunction : public ChromeAsyncExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("downloads.getFileIcon", DOWNLOADS_GETFILEICON) DownloadsGetFileIconFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; void SetIconExtractorForTesting(DownloadFileIconExtractor* extractor); protected: - virtual ~DownloadsGetFileIconFunction(); + ~DownloadsGetFileIconFunction() override; private: void OnIconURLExtracted(const std::string& url); @@ -343,7 +343,7 @@ class ExtensionDownloadsEventRouter explicit ExtensionDownloadsEventRouter( Profile* profile, content::DownloadManager* manager); - virtual ~ExtensionDownloadsEventRouter(); + ~ExtensionDownloadsEventRouter() override; void SetShelfEnabled(const extensions::Extension* extension, bool enabled); bool IsShelfEnabled() const; @@ -362,19 +362,15 @@ class ExtensionDownloadsEventRouter const FilenameChangedCallback& change); // AllDownloadItemNotifier::Observer. - virtual void OnDownloadCreated( - content::DownloadManager* manager, - content::DownloadItem* download_item) override; - virtual void OnDownloadUpdated( - content::DownloadManager* manager, - content::DownloadItem* download_item) override; - virtual void OnDownloadRemoved( - content::DownloadManager* manager, - content::DownloadItem* download_item) override; + void OnDownloadCreated(content::DownloadManager* manager, + content::DownloadItem* download_item) override; + void OnDownloadUpdated(content::DownloadManager* manager, + content::DownloadItem* download_item) override; + void OnDownloadRemoved(content::DownloadManager* manager, + content::DownloadItem* download_item) override; // extensions::EventRouter::Observer. - virtual void OnListenerRemoved( - const extensions::EventListenerInfo& details) override; + void OnListenerRemoved(const extensions::EventListenerInfo& details) override; // Used for testing. struct DownloadsNotificationSource { @@ -390,7 +386,7 @@ class ExtensionDownloadsEventRouter base::Value* json_arg); // extensions::ExtensionRegistryObserver. - virtual void OnExtensionUnloaded( + void OnExtensionUnloaded( content::BrowserContext* browser_context, const extensions::Extension* extension, extensions::UnloadedExtensionInfo::Reason reason) override; diff --git a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc index ece234a..531b5cd 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc @@ -85,7 +85,7 @@ class DownloadsEventsListener : public content::NotificationObserver { content::NotificationService::AllSources()); } - virtual ~DownloadsEventsListener() { + ~DownloadsEventsListener() override { registrar_.Remove(this, extensions::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT, content::NotificationService::AllSources()); @@ -174,9 +174,9 @@ class DownloadsEventsListener : public content::NotificationObserver { typedef ExtensionDownloadsEventRouter::DownloadsNotificationSource DownloadsNotificationSource; - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { switch (type) { case extensions::NOTIFICATION_EXTENSION_DOWNLOADS_EVENT: { DownloadsNotificationSource* dns = @@ -312,7 +312,7 @@ class DownloadExtensionTest : public ExtensionApiTest { Browser* current_browser() { return current_browser_; } // InProcessBrowserTest - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, @@ -617,12 +617,12 @@ class MockIconExtractorImpl : public DownloadFileIconExtractor { expected_icon_size_(icon_size), response_(response) { } - virtual ~MockIconExtractorImpl() {} + ~MockIconExtractorImpl() override {} - virtual bool ExtractIconURLForPath(const base::FilePath& path, - float scale, - IconLoader::IconSize icon_size, - IconURLCallback callback) override { + bool ExtractIconURLForPath(const base::FilePath& path, + float scale, + IconLoader::IconSize icon_size, + IconURLCallback callback) override { EXPECT_STREQ(expected_path_.value().c_str(), path.value().c_str()); EXPECT_EQ(expected_icon_size_, icon_size); if (expected_path_ == path && @@ -758,10 +758,10 @@ class JustInProgressDownloadObserver : content::DownloadTestObserverInProgress(download_manager, wait_count) { } - virtual ~JustInProgressDownloadObserver() {} + ~JustInProgressDownloadObserver() override {} private: - virtual bool IsDownloadInFinalState(DownloadItem* item) override { + bool IsDownloadInFinalState(DownloadItem* item) override { return item->GetState() == DownloadItem::IN_PROGRESS; } diff --git a/chrome/browser/extensions/api/downloads_internal/downloads_internal_api.h b/chrome/browser/extensions/api/downloads_internal/downloads_internal_api.h index 36fbaf1..5dc2448 100644 --- a/chrome/browser/extensions/api/downloads_internal/downloads_internal_api.h +++ b/chrome/browser/extensions/api/downloads_internal/downloads_internal_api.h @@ -15,10 +15,10 @@ class DownloadsInternalDetermineFilenameFunction DECLARE_EXTENSION_FUNCTION("downloadsInternal.determineFilename", DOWNLOADSINTERNAL_DETERMINEFILENAME); DownloadsInternalDetermineFilenameFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~DownloadsInternalDetermineFilenameFunction(); + ~DownloadsInternalDetermineFilenameFunction() override; private: DISALLOW_COPY_AND_ASSIGN(DownloadsInternalDetermineFilenameFunction); diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h index 89b62f3..499caa6 100644 --- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h +++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h @@ -36,7 +36,7 @@ class EasyUnlockPrivateAPI : public BrowserContextKeyedAPI { static const bool kServiceRedirectedInIncognito = true; explicit EasyUnlockPrivateAPI(content::BrowserContext* context); - virtual ~EasyUnlockPrivateAPI(); + ~EasyUnlockPrivateAPI() override; EasyUnlockPrivateCryptoDelegate* crypto_delegate() { return crypto_delegate_.get(); @@ -60,10 +60,10 @@ class EasyUnlockPrivateGetStringsFunction : public SyncExtensionFunction { EasyUnlockPrivateGetStringsFunction(); protected: - virtual ~EasyUnlockPrivateGetStringsFunction(); + ~EasyUnlockPrivateGetStringsFunction() override; // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; private: DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.getStrings", @@ -78,9 +78,9 @@ class EasyUnlockPrivatePerformECDHKeyAgreementFunction EasyUnlockPrivatePerformECDHKeyAgreementFunction(); protected: - virtual ~EasyUnlockPrivatePerformECDHKeyAgreementFunction(); + ~EasyUnlockPrivatePerformECDHKeyAgreementFunction() override; - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnData(const std::string& secret_key); @@ -97,9 +97,9 @@ class EasyUnlockPrivateGenerateEcP256KeyPairFunction EasyUnlockPrivateGenerateEcP256KeyPairFunction(); protected: - virtual ~EasyUnlockPrivateGenerateEcP256KeyPairFunction(); + ~EasyUnlockPrivateGenerateEcP256KeyPairFunction() override; - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnData(const std::string& public_key, @@ -117,9 +117,9 @@ class EasyUnlockPrivateCreateSecureMessageFunction EasyUnlockPrivateCreateSecureMessageFunction(); protected: - virtual ~EasyUnlockPrivateCreateSecureMessageFunction(); + ~EasyUnlockPrivateCreateSecureMessageFunction() override; - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnData(const std::string& message); @@ -136,9 +136,9 @@ class EasyUnlockPrivateUnwrapSecureMessageFunction EasyUnlockPrivateUnwrapSecureMessageFunction(); protected: - virtual ~EasyUnlockPrivateUnwrapSecureMessageFunction(); + ~EasyUnlockPrivateUnwrapSecureMessageFunction() override; - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnData(const std::string& data); @@ -157,10 +157,10 @@ class EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction(); private: - virtual ~EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction(); + ~EasyUnlockPrivateSeekBluetoothDeviceByAddressFunction() override; // AsyncExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; // Callbacks that are called when the seek operation succeeds or fails. void OnSeekSuccess(); @@ -179,11 +179,11 @@ class EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction(); private: - virtual ~EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction(); + ~EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction() override; // BluetoothSocketAbstractConnectFunction: - virtual void ConnectToService(device::BluetoothDevice* device, - const device::BluetoothUUID& uuid) override; + void ConnectToService(device::BluetoothDevice* device, + const device::BluetoothUUID& uuid) override; DISALLOW_COPY_AND_ASSIGN( EasyUnlockPrivateConnectToBluetoothServiceInsecurelyFunction); @@ -195,9 +195,9 @@ class EasyUnlockPrivateUpdateScreenlockStateFunction EasyUnlockPrivateUpdateScreenlockStateFunction(); protected: - virtual ~EasyUnlockPrivateUpdateScreenlockStateFunction(); + ~EasyUnlockPrivateUpdateScreenlockStateFunction() override; - virtual bool RunSync() override; + bool RunSync() override; private: DECLARE_EXTENSION_FUNCTION("easyUnlockPrivate.updateScreenlockState", @@ -213,10 +213,10 @@ class EasyUnlockPrivateSetPermitAccessFunction : public SyncExtensionFunction { EasyUnlockPrivateSetPermitAccessFunction(); private: - virtual ~EasyUnlockPrivateSetPermitAccessFunction(); + ~EasyUnlockPrivateSetPermitAccessFunction() override; // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetPermitAccessFunction); }; @@ -228,10 +228,10 @@ class EasyUnlockPrivateGetPermitAccessFunction : public SyncExtensionFunction { EasyUnlockPrivateGetPermitAccessFunction(); private: - virtual ~EasyUnlockPrivateGetPermitAccessFunction(); + ~EasyUnlockPrivateGetPermitAccessFunction() override; // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetPermitAccessFunction); }; @@ -244,10 +244,10 @@ class EasyUnlockPrivateClearPermitAccessFunction EasyUnlockPrivateClearPermitAccessFunction(); private: - virtual ~EasyUnlockPrivateClearPermitAccessFunction(); + ~EasyUnlockPrivateClearPermitAccessFunction() override; // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateClearPermitAccessFunction); }; @@ -259,10 +259,10 @@ class EasyUnlockPrivateSetRemoteDevicesFunction : public SyncExtensionFunction { EasyUnlockPrivateSetRemoteDevicesFunction(); private: - virtual ~EasyUnlockPrivateSetRemoteDevicesFunction(); + ~EasyUnlockPrivateSetRemoteDevicesFunction() override; // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateSetRemoteDevicesFunction); }; @@ -274,10 +274,10 @@ class EasyUnlockPrivateGetRemoteDevicesFunction : public SyncExtensionFunction { EasyUnlockPrivateGetRemoteDevicesFunction(); private: - virtual ~EasyUnlockPrivateGetRemoteDevicesFunction(); + ~EasyUnlockPrivateGetRemoteDevicesFunction() override; // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetRemoteDevicesFunction); }; @@ -290,10 +290,10 @@ class EasyUnlockPrivateGetSignInChallengeFunction : EasyUnlockPrivateGetSignInChallengeFunction(); private: - virtual ~EasyUnlockPrivateGetSignInChallengeFunction(); + ~EasyUnlockPrivateGetSignInChallengeFunction() override; // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetSignInChallengeFunction); }; @@ -306,10 +306,10 @@ class EasyUnlockPrivateTrySignInSecretFunction : EasyUnlockPrivateTrySignInSecretFunction(); private: - virtual ~EasyUnlockPrivateTrySignInSecretFunction(); + ~EasyUnlockPrivateTrySignInSecretFunction() override; // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateTrySignInSecretFunction); }; @@ -321,10 +321,10 @@ class EasyUnlockPrivateGetUserInfoFunction : public SyncExtensionFunction { EasyUnlockPrivateGetUserInfoFunction(); private: - virtual ~EasyUnlockPrivateGetUserInfoFunction(); + ~EasyUnlockPrivateGetUserInfoFunction() override; // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; DISALLOW_COPY_AND_ASSIGN(EasyUnlockPrivateGetUserInfoFunction); }; diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_crypto_delegate_stub.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_crypto_delegate_stub.cc index 126a5d9..5869930 100644 --- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_crypto_delegate_stub.cc +++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_crypto_delegate_stub.cc @@ -15,25 +15,25 @@ class EasyUnlockPrivateCryptoDelegateStub public: EasyUnlockPrivateCryptoDelegateStub() {} - virtual ~EasyUnlockPrivateCryptoDelegateStub() {} + ~EasyUnlockPrivateCryptoDelegateStub() override {} - virtual void GenerateEcP256KeyPair(const KeyPairCallback& callback) override { + void GenerateEcP256KeyPair(const KeyPairCallback& callback) override { callback.Run("", ""); } - virtual void PerformECDHKeyAgreement( + void PerformECDHKeyAgreement( const easy_unlock_private::PerformECDHKeyAgreement::Params& params, const DataCallback& callback) override { callback.Run(""); } - virtual void CreateSecureMessage( + void CreateSecureMessage( const easy_unlock_private::CreateSecureMessage::Params& params, const DataCallback& callback) override { callback.Run(""); } - virtual void UnwrapSecureMessage( + void UnwrapSecureMessage( const easy_unlock_private::UnwrapSecureMessage::Params& params, const DataCallback& callback) override { callback.Run(""); diff --git a/chrome/browser/extensions/api/experience_sampling_private/experience_sampling_private_api.h b/chrome/browser/extensions/api/experience_sampling_private/experience_sampling_private_api.h index a512763..e199f28 100644 --- a/chrome/browser/extensions/api/experience_sampling_private/experience_sampling_private_api.h +++ b/chrome/browser/extensions/api/experience_sampling_private/experience_sampling_private_api.h @@ -12,10 +12,10 @@ namespace extensions { class ExperienceSamplingPrivateGetBrowserInfoFunction : public ChromeAsyncExtensionFunction { protected: - virtual ~ExperienceSamplingPrivateGetBrowserInfoFunction() {} + ~ExperienceSamplingPrivateGetBrowserInfoFunction() override {} // ExtensionFuction: - virtual bool RunAsync() override; + bool RunAsync() override; private: DECLARE_EXTENSION_FUNCTION("experienceSamplingPrivate.getBrowserInfo", diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api.h b/chrome/browser/extensions/api/extension_action/extension_action_api.h index 2abf132..5a1f6ce 100644 --- a/chrome/browser/extensions/api/extension_action/extension_action_api.h +++ b/chrome/browser/extensions/api/extension_action/extension_action_api.h @@ -55,7 +55,7 @@ class ExtensionActionAPI : public BrowserContextKeyedAPI { }; explicit ExtensionActionAPI(content::BrowserContext* context); - virtual ~ExtensionActionAPI(); + ~ExtensionActionAPI() override; // Convenience method to get the instance for a profile. static ExtensionActionAPI* Get(content::BrowserContext* context); @@ -124,7 +124,7 @@ class ExtensionActionAPI : public BrowserContextKeyedAPI { content::WebContents* web_contents); // BrowserContextKeyedAPI implementation. - virtual void Shutdown() override; + void Shutdown() override; static const char* service_name() { return "ExtensionActionAPI"; } static const bool kServiceRedirectedInIncognito = true; @@ -148,8 +148,8 @@ class ExtensionActionFunction : public ChromeSyncExtensionFunction { protected: ExtensionActionFunction(); - virtual ~ExtensionActionFunction(); - virtual bool RunSync() override; + ~ExtensionActionFunction() override; + bool RunSync() override; virtual bool RunExtensionAction() = 0; bool ExtractDataFromArguments(); @@ -181,80 +181,80 @@ class ExtensionActionFunction : public ChromeSyncExtensionFunction { // show class ExtensionActionShowFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionShowFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionShowFunction() override {} + bool RunExtensionAction() override; }; // hide class ExtensionActionHideFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionHideFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionHideFunction() override {} + bool RunExtensionAction() override; }; // setIcon class ExtensionActionSetIconFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionSetIconFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionSetIconFunction() override {} + bool RunExtensionAction() override; }; // setTitle class ExtensionActionSetTitleFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionSetTitleFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionSetTitleFunction() override {} + bool RunExtensionAction() override; }; // setPopup class ExtensionActionSetPopupFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionSetPopupFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionSetPopupFunction() override {} + bool RunExtensionAction() override; }; // setBadgeText class ExtensionActionSetBadgeTextFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionSetBadgeTextFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionSetBadgeTextFunction() override {} + bool RunExtensionAction() override; }; // setBadgeBackgroundColor class ExtensionActionSetBadgeBackgroundColorFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionSetBadgeBackgroundColorFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionSetBadgeBackgroundColorFunction() override {} + bool RunExtensionAction() override; }; // getTitle class ExtensionActionGetTitleFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionGetTitleFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionGetTitleFunction() override {} + bool RunExtensionAction() override; }; // getPopup class ExtensionActionGetPopupFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionGetPopupFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionGetPopupFunction() override {} + bool RunExtensionAction() override; }; // getBadgeText class ExtensionActionGetBadgeTextFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionGetBadgeTextFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionGetBadgeTextFunction() override {} + bool RunExtensionAction() override; }; // getBadgeBackgroundColor class ExtensionActionGetBadgeBackgroundColorFunction : public ExtensionActionFunction { protected: - virtual ~ExtensionActionGetBadgeBackgroundColorFunction() {} - virtual bool RunExtensionAction() override; + ~ExtensionActionGetBadgeBackgroundColorFunction() override {} + bool RunExtensionAction() override; }; // @@ -266,7 +266,7 @@ class BrowserActionSetIconFunction : public ExtensionActionSetIconFunction { DECLARE_EXTENSION_FUNCTION("browserAction.setIcon", BROWSERACTION_SETICON) protected: - virtual ~BrowserActionSetIconFunction() {} + ~BrowserActionSetIconFunction() override {} }; class BrowserActionSetTitleFunction : public ExtensionActionSetTitleFunction { @@ -274,7 +274,7 @@ class BrowserActionSetTitleFunction : public ExtensionActionSetTitleFunction { DECLARE_EXTENSION_FUNCTION("browserAction.setTitle", BROWSERACTION_SETTITLE) protected: - virtual ~BrowserActionSetTitleFunction() {} + ~BrowserActionSetTitleFunction() override {} }; class BrowserActionSetPopupFunction : public ExtensionActionSetPopupFunction { @@ -282,7 +282,7 @@ class BrowserActionSetPopupFunction : public ExtensionActionSetPopupFunction { DECLARE_EXTENSION_FUNCTION("browserAction.setPopup", BROWSERACTION_SETPOPUP) protected: - virtual ~BrowserActionSetPopupFunction() {} + ~BrowserActionSetPopupFunction() override {} }; class BrowserActionGetTitleFunction : public ExtensionActionGetTitleFunction { @@ -290,7 +290,7 @@ class BrowserActionGetTitleFunction : public ExtensionActionGetTitleFunction { DECLARE_EXTENSION_FUNCTION("browserAction.getTitle", BROWSERACTION_GETTITLE) protected: - virtual ~BrowserActionGetTitleFunction() {} + ~BrowserActionGetTitleFunction() override {} }; class BrowserActionGetPopupFunction : public ExtensionActionGetPopupFunction { @@ -298,7 +298,7 @@ class BrowserActionGetPopupFunction : public ExtensionActionGetPopupFunction { DECLARE_EXTENSION_FUNCTION("browserAction.getPopup", BROWSERACTION_GETPOPUP) protected: - virtual ~BrowserActionGetPopupFunction() {} + ~BrowserActionGetPopupFunction() override {} }; class BrowserActionSetBadgeTextFunction @@ -308,7 +308,7 @@ class BrowserActionSetBadgeTextFunction BROWSERACTION_SETBADGETEXT) protected: - virtual ~BrowserActionSetBadgeTextFunction() {} + ~BrowserActionSetBadgeTextFunction() override {} }; class BrowserActionSetBadgeBackgroundColorFunction @@ -318,7 +318,7 @@ class BrowserActionSetBadgeBackgroundColorFunction BROWSERACTION_SETBADGEBACKGROUNDCOLOR) protected: - virtual ~BrowserActionSetBadgeBackgroundColorFunction() {} + ~BrowserActionSetBadgeBackgroundColorFunction() override {} }; class BrowserActionGetBadgeTextFunction @@ -328,7 +328,7 @@ class BrowserActionGetBadgeTextFunction BROWSERACTION_GETBADGETEXT) protected: - virtual ~BrowserActionGetBadgeTextFunction() {} + ~BrowserActionGetBadgeTextFunction() override {} }; class BrowserActionGetBadgeBackgroundColorFunction @@ -338,7 +338,7 @@ class BrowserActionGetBadgeBackgroundColorFunction BROWSERACTION_GETBADGEBACKGROUNDCOLOR) protected: - virtual ~BrowserActionGetBadgeBackgroundColorFunction() {} + ~BrowserActionGetBadgeBackgroundColorFunction() override {} }; class BrowserActionEnableFunction : public ExtensionActionShowFunction { @@ -346,7 +346,7 @@ class BrowserActionEnableFunction : public ExtensionActionShowFunction { DECLARE_EXTENSION_FUNCTION("browserAction.enable", BROWSERACTION_ENABLE) protected: - virtual ~BrowserActionEnableFunction() {} + ~BrowserActionEnableFunction() override {} }; class BrowserActionDisableFunction : public ExtensionActionHideFunction { @@ -354,7 +354,7 @@ class BrowserActionDisableFunction : public ExtensionActionHideFunction { DECLARE_EXTENSION_FUNCTION("browserAction.disable", BROWSERACTION_DISABLE) protected: - virtual ~BrowserActionDisableFunction() {} + ~BrowserActionDisableFunction() override {} }; class BrowserActionOpenPopupFunction : public ChromeAsyncExtensionFunction, @@ -365,14 +365,14 @@ class BrowserActionOpenPopupFunction : public ChromeAsyncExtensionFunction, BrowserActionOpenPopupFunction(); private: - virtual ~BrowserActionOpenPopupFunction() {} + ~BrowserActionOpenPopupFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; void OpenPopupTimedOut(); content::NotificationRegistrar registrar_; @@ -392,7 +392,7 @@ class PageActionShowFunction : public extensions::ExtensionActionShowFunction { DECLARE_EXTENSION_FUNCTION("pageAction.show", PAGEACTION_SHOW) protected: - virtual ~PageActionShowFunction() {} + ~PageActionShowFunction() override {} }; class PageActionHideFunction : public extensions::ExtensionActionHideFunction { @@ -400,7 +400,7 @@ class PageActionHideFunction : public extensions::ExtensionActionHideFunction { DECLARE_EXTENSION_FUNCTION("pageAction.hide", PAGEACTION_HIDE) protected: - virtual ~PageActionHideFunction() {} + ~PageActionHideFunction() override {} }; class PageActionSetIconFunction @@ -409,7 +409,7 @@ class PageActionSetIconFunction DECLARE_EXTENSION_FUNCTION("pageAction.setIcon", PAGEACTION_SETICON) protected: - virtual ~PageActionSetIconFunction() {} + ~PageActionSetIconFunction() override {} }; class PageActionSetTitleFunction @@ -418,7 +418,7 @@ class PageActionSetTitleFunction DECLARE_EXTENSION_FUNCTION("pageAction.setTitle", PAGEACTION_SETTITLE) protected: - virtual ~PageActionSetTitleFunction() {} + ~PageActionSetTitleFunction() override {} }; class PageActionSetPopupFunction @@ -427,7 +427,7 @@ class PageActionSetPopupFunction DECLARE_EXTENSION_FUNCTION("pageAction.setPopup", PAGEACTION_SETPOPUP) protected: - virtual ~PageActionSetPopupFunction() {} + ~PageActionSetPopupFunction() override {} }; class PageActionGetTitleFunction @@ -436,7 +436,7 @@ class PageActionGetTitleFunction DECLARE_EXTENSION_FUNCTION("pageAction.getTitle", PAGEACTION_GETTITLE) protected: - virtual ~PageActionGetTitleFunction() {} + ~PageActionGetTitleFunction() override {} }; class PageActionGetPopupFunction @@ -445,7 +445,7 @@ class PageActionGetPopupFunction DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP) protected: - virtual ~PageActionGetPopupFunction() {} + ~PageActionGetPopupFunction() override {} }; #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_ diff --git a/chrome/browser/extensions/api/extension_action/extension_action_prefs_unittest.cc b/chrome/browser/extensions/api/extension_action/extension_action_prefs_unittest.cc index 6798c63..1d8e23e 100644 --- a/chrome/browser/extensions/api/extension_action/extension_action_prefs_unittest.cc +++ b/chrome/browser/extensions/api/extension_action/extension_action_prefs_unittest.cc @@ -16,7 +16,7 @@ namespace extensions { // Tests force hiding browser actions. class ExtensionPrefsHidingBrowserActions : public ExtensionPrefsTest { public: - virtual void Initialize() override { + void Initialize() override { // Install 5 extensions. for (int i = 0; i < 5; i++) { std::string name = "test" + base::IntToString(i); @@ -35,7 +35,7 @@ class ExtensionPrefsHidingBrowserActions : public ExtensionPrefsTest { prefs(), extensions_[1]->id(), true); } - virtual void Verify() override { + void Verify() override { // Make sure the one we hid is hidden. EXPECT_FALSE(ExtensionActionAPI::GetBrowserActionVisibility( prefs(), extensions_[0]->id())); diff --git a/chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc b/chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc index e9dcd87..425225e 100644 --- a/chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc +++ b/chrome/browser/extensions/api/feedback_private/feedback_browsertest.cc @@ -36,7 +36,7 @@ class FeedbackTest : public ExtensionBrowserTest { InProcessBrowserTest::SetUp(); } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { command_line->AppendSwitch(::switches::kEnableUserMediaScreenCapturing); InProcessBrowserTest::SetUpCommandLine(command_line); } diff --git a/chrome/browser/extensions/api/feedback_private/feedback_private_api.h b/chrome/browser/extensions/api/feedback_private/feedback_private_api.h index d979808..fc78aec 100644 --- a/chrome/browser/extensions/api/feedback_private/feedback_private_api.h +++ b/chrome/browser/extensions/api/feedback_private/feedback_private_api.h @@ -21,7 +21,7 @@ using extensions::api::feedback_private::SystemInformation; class FeedbackPrivateAPI : public BrowserContextKeyedAPI { public: explicit FeedbackPrivateAPI(content::BrowserContext* context); - virtual ~FeedbackPrivateAPI(); + ~FeedbackPrivateAPI() override; FeedbackService* GetService() const; void RequestFeedback(const std::string& description_template, @@ -58,10 +58,10 @@ class FeedbackPrivateGetStringsFunction : public ChromeSyncExtensionFunction { } protected: - virtual ~FeedbackPrivateGetStringsFunction() {} + ~FeedbackPrivateGetStringsFunction() override {} // SyncExtensionFunction overrides. - virtual bool RunSync() override; + bool RunSync() override; private: static base::Closure* test_callback_; @@ -73,8 +73,8 @@ class FeedbackPrivateGetUserEmailFunction : public ChromeSyncExtensionFunction { FEEDBACKPRIVATE_GETUSEREMAIL); protected: - virtual ~FeedbackPrivateGetUserEmailFunction() {} - virtual bool RunSync() override; + ~FeedbackPrivateGetUserEmailFunction() override {} + bool RunSync() override; }; class FeedbackPrivateGetSystemInformationFunction @@ -84,8 +84,8 @@ class FeedbackPrivateGetSystemInformationFunction FEEDBACKPRIVATE_GETSYSTEMINFORMATION); protected: - virtual ~FeedbackPrivateGetSystemInformationFunction() {} - virtual bool RunAsync() override; + ~FeedbackPrivateGetSystemInformationFunction() override {} + bool RunAsync() override; private: void OnCompleted( @@ -99,8 +99,8 @@ class FeedbackPrivateSendFeedbackFunction FEEDBACKPRIVATE_SENDFEEDBACK); protected: - virtual ~FeedbackPrivateSendFeedbackFunction() {} - virtual bool RunAsync() override; + ~FeedbackPrivateSendFeedbackFunction() override {} + bool RunAsync() override; private: void OnCompleted(bool success); diff --git a/chrome/browser/extensions/api/feedback_private/feedback_service_nonchromeos.cc b/chrome/browser/extensions/api/feedback_private/feedback_service_nonchromeos.cc index e958a1b..11f33e3 100644 --- a/chrome/browser/extensions/api/feedback_private/feedback_service_nonchromeos.cc +++ b/chrome/browser/extensions/api/feedback_private/feedback_service_nonchromeos.cc @@ -18,14 +18,14 @@ class FeedbackServiceImpl public base::SupportsWeakPtr<FeedbackServiceImpl> { public: FeedbackServiceImpl(); - virtual ~FeedbackServiceImpl(); + ~FeedbackServiceImpl() override; - virtual std::string GetUserEmail() override; - virtual void GetHistograms(std::string* histograms) override; + std::string GetUserEmail() override; + void GetHistograms(std::string* histograms) override; private: // Overridden from FeedbackService: - virtual base::WeakPtr<FeedbackService> GetWeakPtr() override; + base::WeakPtr<FeedbackService> GetWeakPtr() override; DISALLOW_COPY_AND_ASSIGN(FeedbackServiceImpl); }; diff --git a/chrome/browser/extensions/api/file_system/entry_watcher_service.h b/chrome/browser/extensions/api/file_system/entry_watcher_service.h index a75448e..5b3ddd4 100644 --- a/chrome/browser/extensions/api/file_system/entry_watcher_service.h +++ b/chrome/browser/extensions/api/file_system/entry_watcher_service.h @@ -43,7 +43,7 @@ class EntryWatcherService : public KeyedService, content::BrowserContext* context)> GetFileSystemContextImplCallback; explicit EntryWatcherService(content::BrowserContext* context); - virtual ~EntryWatcherService(); + ~EntryWatcherService() override; // Watches a directory. Only one watcher can be set per the same |url| and // |extension_id|. @@ -61,8 +61,8 @@ class EntryWatcherService : public KeyedService, const std::string& extension_id); // storage::WatcherManager::Observer overrides. - virtual void OnEntryChanged(const storage::FileSystemURL& url) override; - virtual void OnEntryRemoved(const storage::FileSystemURL& url) override; + void OnEntryChanged(const storage::FileSystemURL& url) override; + void OnEntryRemoved(const storage::FileSystemURL& url) override; // Sets a custom dispatcher for tests in order to be able to verify dispatched // events. diff --git a/chrome/browser/extensions/api/file_system/entry_watcher_service_factory.h b/chrome/browser/extensions/api/file_system/entry_watcher_service_factory.h index 0fe06fc..1f783d3 100644 --- a/chrome/browser/extensions/api/file_system/entry_watcher_service_factory.h +++ b/chrome/browser/extensions/api/file_system/entry_watcher_service_factory.h @@ -34,12 +34,12 @@ class EntryWatcherServiceFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<EntryWatcherServiceFactory>; EntryWatcherServiceFactory(); - virtual ~EntryWatcherServiceFactory(); + ~EntryWatcherServiceFactory() override; // BrowserContextKeyedServiceFactory overrides: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsCreatedWithBrowserContext() const override; DISALLOW_COPY_AND_ASSIGN(EntryWatcherServiceFactory); }; diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc index bbc9b20..dbe8bfd 100644 --- a/chrome/browser/extensions/api/file_system/file_system_api.cc +++ b/chrome/browser/extensions/api/file_system/file_system_api.cc @@ -443,21 +443,21 @@ class FileSystemChooseEntryFunction::FilePicker NULL); } - virtual ~FilePicker() {} + ~FilePicker() override {} private: // ui::SelectFileDialog::Listener implementation. - virtual void FileSelected(const base::FilePath& path, - int index, - void* params) override { + void FileSelected(const base::FilePath& path, + int index, + void* params) override { std::vector<base::FilePath> paths; paths.push_back(path); MultiFilesSelected(paths, params); } - virtual void FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file, - int index, - void* params) override { + void FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file, + int index, + void* params) override { // Normally, file.local_path is used because it is a native path to the // local read-only cached file in the case of remote file system like // Chrome OS's Google Drive integration. Here, however, |file.file_path| is @@ -469,13 +469,13 @@ class FileSystemChooseEntryFunction::FilePicker FileSelected(file.file_path, index, params); } - virtual void MultiFilesSelected(const std::vector<base::FilePath>& files, - void* params) override { + void MultiFilesSelected(const std::vector<base::FilePath>& files, + void* params) override { function_->FilesSelected(files); delete this; } - virtual void MultiFilesSelectedWithExtraInfo( + void MultiFilesSelectedWithExtraInfo( const std::vector<ui::SelectedFileInfo>& files, void* params) override { std::vector<base::FilePath> paths; @@ -486,7 +486,7 @@ class FileSystemChooseEntryFunction::FilePicker MultiFilesSelected(paths, params); } - virtual void FileSelectionCanceled(void* params) override { + void FileSelectionCanceled(void* params) override { function_->FileSelectionCanceled(); delete this; } diff --git a/chrome/browser/extensions/api/file_system/file_system_api.h b/chrome/browser/extensions/api/file_system/file_system_api.h index 62bfa52..1b78277 100644 --- a/chrome/browser/extensions/api/file_system/file_system_api.h +++ b/chrome/browser/extensions/api/file_system/file_system_api.h @@ -40,15 +40,15 @@ class FileSystemGetDisplayPathFunction : public ChromeSyncExtensionFunction { FILESYSTEM_GETDISPLAYPATH) protected: - virtual ~FileSystemGetDisplayPathFunction() {} - virtual bool RunSync() override; + ~FileSystemGetDisplayPathFunction() override {} + bool RunSync() override; }; class FileSystemEntryFunction : public ChromeAsyncExtensionFunction { protected: FileSystemEntryFunction(); - virtual ~FileSystemEntryFunction() {} + ~FileSystemEntryFunction() override {} // This is called when writable file entries are being returned. The function // will ensure the files exist, creating them if necessary, and also check @@ -88,8 +88,8 @@ class FileSystemGetWritableEntryFunction : public FileSystemEntryFunction { FILESYSTEM_GETWRITABLEENTRY) protected: - virtual ~FileSystemGetWritableEntryFunction() {} - virtual bool RunAsync() override; + ~FileSystemGetWritableEntryFunction() override {} + bool RunAsync() override; private: void CheckPermissionAndSendResponse(); @@ -105,8 +105,8 @@ class FileSystemIsWritableEntryFunction : public ChromeSyncExtensionFunction { FILESYSTEM_ISWRITABLEENTRY) protected: - virtual ~FileSystemIsWritableEntryFunction() {} - virtual bool RunSync() override; + ~FileSystemIsWritableEntryFunction() override {} + bool RunSync() override; }; class FileSystemChooseEntryFunction : public FileSystemEntryFunction { @@ -145,8 +145,8 @@ class FileSystemChooseEntryFunction : public FileSystemEntryFunction { protected: class FilePicker; - virtual ~FileSystemChooseEntryFunction() {} - virtual bool RunAsync() override; + ~FileSystemChooseEntryFunction() override {} + bool RunAsync() override; void ShowPicker(const ui::SelectFileDialog::FileTypeInfo& file_type_info, ui::SelectFileDialog::Type picker_type); @@ -177,8 +177,8 @@ class FileSystemRetainEntryFunction : public ChromeAsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("fileSystem.retainEntry", FILESYSTEM_RETAINENTRY) protected: - virtual ~FileSystemRetainEntryFunction() {} - virtual bool RunAsync() override; + ~FileSystemRetainEntryFunction() override {} + bool RunAsync() override; private: // Retains the file entry referenced by |entry_id| in apps::SavedFilesService. @@ -195,8 +195,8 @@ class FileSystemIsRestorableFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("fileSystem.isRestorable", FILESYSTEM_ISRESTORABLE) protected: - virtual ~FileSystemIsRestorableFunction() {} - virtual bool RunSync() override; + ~FileSystemIsRestorableFunction() override {} + bool RunSync() override; }; class FileSystemRestoreEntryFunction : public FileSystemEntryFunction { @@ -204,8 +204,8 @@ class FileSystemRestoreEntryFunction : public FileSystemEntryFunction { DECLARE_EXTENSION_FUNCTION("fileSystem.restoreEntry", FILESYSTEM_RESTOREENTRY) protected: - virtual ~FileSystemRestoreEntryFunction() {} - virtual bool RunAsync() override; + ~FileSystemRestoreEntryFunction() override {} + bool RunAsync() override; }; class FileSystemObserveDirectoryFunction : public ChromeSyncExtensionFunction { @@ -214,8 +214,8 @@ class FileSystemObserveDirectoryFunction : public ChromeSyncExtensionFunction { FILESYSTEM_OBSERVEDIRECTORY) protected: - virtual ~FileSystemObserveDirectoryFunction() {} - virtual bool RunSync() override; + ~FileSystemObserveDirectoryFunction() override {} + bool RunSync() override; }; class FileSystemUnobserveEntryFunction : public ChromeSyncExtensionFunction { @@ -224,8 +224,8 @@ class FileSystemUnobserveEntryFunction : public ChromeSyncExtensionFunction { FILESYSTEM_UNOBSERVEENTRY) protected: - virtual ~FileSystemUnobserveEntryFunction() {} - virtual bool RunSync() override; + ~FileSystemUnobserveEntryFunction() override {} + bool RunSync() override; }; class FileSystemGetObservedEntriesFunction @@ -235,8 +235,8 @@ class FileSystemGetObservedEntriesFunction FILESYSTEM_GETOBSERVEDENTRIES); protected: - virtual ~FileSystemGetObservedEntriesFunction() {} - virtual bool RunSync() override; + ~FileSystemGetObservedEntriesFunction() override {} + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/file_system/file_system_apitest.cc b/chrome/browser/extensions/api/file_system/file_system_apitest.cc index 91939f7..4b1861d 100644 --- a/chrome/browser/extensions/api/file_system/file_system_apitest.cc +++ b/chrome/browser/extensions/api/file_system/file_system_apitest.cc @@ -31,8 +31,8 @@ class AppLoadObserver : public ExtensionRegistryObserver { extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context)); } - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override { + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override { callback_.Run(extension); } @@ -64,7 +64,7 @@ const int kGraylistedPath = base::DIR_HOME; class FileSystemApiTest : public PlatformAppBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { PlatformAppBrowserTest::SetUpCommandLine(command_line); test_root_folder_ = test_data_dir_.AppendASCII("api_test") .AppendASCII("file_system"); @@ -72,9 +72,7 @@ class FileSystemApiTest : public PlatformAppBrowserTest { "test_root", test_root_folder_); } - virtual void SetUpOnMainThread() override { - ClearCommandLineArgs(); - } + void SetUpOnMainThread() override { ClearCommandLineArgs(); } virtual void TearDown() override { FileSystemChooseEntryFunction::StopSkippingPickerForTest(); diff --git a/chrome/browser/extensions/api/font_settings/font_settings_api.h b/chrome/browser/extensions/api/font_settings/font_settings_api.h index b2dc212..8d506fe 100644 --- a/chrome/browser/extensions/api/font_settings/font_settings_api.h +++ b/chrome/browser/extensions/api/font_settings/font_settings_api.h @@ -77,7 +77,7 @@ class FontSettingsEventRouter { class FontSettingsAPI : public BrowserContextKeyedAPI { public: explicit FontSettingsAPI(content::BrowserContext* context); - virtual ~FontSettingsAPI(); + ~FontSettingsAPI() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<FontSettingsAPI>* GetFactoryInstance(); @@ -102,10 +102,10 @@ class FontSettingsClearFontFunction : public ChromeSyncExtensionFunction { protected: // RefCounted types have non-public destructors, as with all extension // functions in this file. - virtual ~FontSettingsClearFontFunction() {} + ~FontSettingsClearFontFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // fontSettings.getFont API function. @@ -114,10 +114,10 @@ class FontSettingsGetFontFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("fontSettings.getFont", FONTSETTINGS_GETFONT) protected: - virtual ~FontSettingsGetFontFunction() {} + ~FontSettingsGetFontFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // fontSettings.setFont API function. @@ -126,10 +126,10 @@ class FontSettingsSetFontFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("fontSettings.setFont", FONTSETTINGS_SETFONT) protected: - virtual ~FontSettingsSetFontFunction() {} + ~FontSettingsSetFontFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // fontSettings.getFontList API function. @@ -139,10 +139,10 @@ class FontSettingsGetFontListFunction : public ChromeAsyncExtensionFunction { FONTSETTINGS_GETFONTLIST) protected: - virtual ~FontSettingsGetFontListFunction() {} + ~FontSettingsGetFontListFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void FontListHasLoaded(scoped_ptr<base::ListValue> list); @@ -152,10 +152,10 @@ class FontSettingsGetFontListFunction : public ChromeAsyncExtensionFunction { // Base class for extension API functions that clear a browser font pref. class ClearFontPrefExtensionFunction : public ChromeSyncExtensionFunction { protected: - virtual ~ClearFontPrefExtensionFunction() {} + ~ClearFontPrefExtensionFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; // Implementations should return the name of the preference to clear, like // "webkit.webprefs.default_font_size". @@ -165,10 +165,10 @@ class ClearFontPrefExtensionFunction : public ChromeSyncExtensionFunction { // Base class for extension API functions that get a browser font pref. class GetFontPrefExtensionFunction : public ChromeSyncExtensionFunction { protected: - virtual ~GetFontPrefExtensionFunction() {} + ~GetFontPrefExtensionFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; // Implementations should return the name of the preference to get, like // "webkit.webprefs.default_font_size". @@ -182,10 +182,10 @@ class GetFontPrefExtensionFunction : public ChromeSyncExtensionFunction { // Base class for extension API functions that set a browser font pref. class SetFontPrefExtensionFunction : public ChromeSyncExtensionFunction { protected: - virtual ~SetFontPrefExtensionFunction() {} + ~SetFontPrefExtensionFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; // Implementations should return the name of the preference to set, like // "webkit.webprefs.default_font_size". @@ -206,10 +206,10 @@ class FontSettingsClearDefaultFontSizeFunction FONTSETTINGS_CLEARDEFAULTFONTSIZE) protected: - virtual ~FontSettingsClearDefaultFontSizeFunction() {} + ~FontSettingsClearDefaultFontSizeFunction() override {} // ClearFontPrefExtensionFunction: - virtual const char* GetPrefName() override; + const char* GetPrefName() override; }; class FontSettingsGetDefaultFontSizeFunction @@ -219,11 +219,11 @@ class FontSettingsGetDefaultFontSizeFunction FONTSETTINGS_GETDEFAULTFONTSIZE) protected: - virtual ~FontSettingsGetDefaultFontSizeFunction() {} + ~FontSettingsGetDefaultFontSizeFunction() override {} // GetFontPrefExtensionFunction: - virtual const char* GetPrefName() override; - virtual const char* GetKey() override; + const char* GetPrefName() override; + const char* GetKey() override; }; class FontSettingsSetDefaultFontSizeFunction @@ -233,11 +233,11 @@ class FontSettingsSetDefaultFontSizeFunction FONTSETTINGS_SETDEFAULTFONTSIZE) protected: - virtual ~FontSettingsSetDefaultFontSizeFunction() {} + ~FontSettingsSetDefaultFontSizeFunction() override {} // SetFontPrefExtensionFunction: - virtual const char* GetPrefName() override; - virtual const char* GetKey() override; + const char* GetPrefName() override; + const char* GetKey() override; }; class FontSettingsClearDefaultFixedFontSizeFunction @@ -247,10 +247,10 @@ class FontSettingsClearDefaultFixedFontSizeFunction FONTSETTINGS_CLEARDEFAULTFIXEDFONTSIZE) protected: - virtual ~FontSettingsClearDefaultFixedFontSizeFunction() {} + ~FontSettingsClearDefaultFixedFontSizeFunction() override {} // ClearFontPrefExtensionFunction: - virtual const char* GetPrefName() override; + const char* GetPrefName() override; }; class FontSettingsGetDefaultFixedFontSizeFunction @@ -260,11 +260,11 @@ class FontSettingsGetDefaultFixedFontSizeFunction FONTSETTINGS_GETDEFAULTFIXEDFONTSIZE) protected: - virtual ~FontSettingsGetDefaultFixedFontSizeFunction() {} + ~FontSettingsGetDefaultFixedFontSizeFunction() override {} // GetFontPrefExtensionFunction: - virtual const char* GetPrefName() override; - virtual const char* GetKey() override; + const char* GetPrefName() override; + const char* GetKey() override; }; class FontSettingsSetDefaultFixedFontSizeFunction @@ -274,11 +274,11 @@ class FontSettingsSetDefaultFixedFontSizeFunction FONTSETTINGS_SETDEFAULTFIXEDFONTSIZE) protected: - virtual ~FontSettingsSetDefaultFixedFontSizeFunction() {} + ~FontSettingsSetDefaultFixedFontSizeFunction() override {} // SetFontPrefExtensionFunction: - virtual const char* GetPrefName() override; - virtual const char* GetKey() override; + const char* GetPrefName() override; + const char* GetKey() override; }; class FontSettingsClearMinimumFontSizeFunction @@ -288,10 +288,10 @@ class FontSettingsClearMinimumFontSizeFunction FONTSETTINGS_CLEARMINIMUMFONTSIZE) protected: - virtual ~FontSettingsClearMinimumFontSizeFunction() {} + ~FontSettingsClearMinimumFontSizeFunction() override {} // ClearFontPrefExtensionFunction: - virtual const char* GetPrefName() override; + const char* GetPrefName() override; }; class FontSettingsGetMinimumFontSizeFunction @@ -301,11 +301,11 @@ class FontSettingsGetMinimumFontSizeFunction FONTSETTINGS_GETMINIMUMFONTSIZE) protected: - virtual ~FontSettingsGetMinimumFontSizeFunction() {} + ~FontSettingsGetMinimumFontSizeFunction() override {} // GetFontPrefExtensionFunction: - virtual const char* GetPrefName() override; - virtual const char* GetKey() override; + const char* GetPrefName() override; + const char* GetKey() override; }; class FontSettingsSetMinimumFontSizeFunction @@ -315,11 +315,11 @@ class FontSettingsSetMinimumFontSizeFunction FONTSETTINGS_SETMINIMUMFONTSIZE) protected: - virtual ~FontSettingsSetMinimumFontSizeFunction() {} + ~FontSettingsSetMinimumFontSizeFunction() override {} // SetFontPrefExtensionFunction: - virtual const char* GetPrefName() override; - virtual const char* GetKey() override; + const char* GetPrefName() override; + const char* GetKey() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/gcd_private/gcd_private_api.cc b/chrome/browser/extensions/api/gcd_private/gcd_private_api.cc index 63d77e3..1137332 100644 --- a/chrome/browser/extensions/api/gcd_private/gcd_private_api.cc +++ b/chrome/browser/extensions/api/gcd_private/gcd_private_api.cc @@ -150,16 +150,16 @@ class GcdPrivateAPIImpl : public EventRouter::Observer, PasswordMap; // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; // local_discovery::PrivetDeviceLister implementation. - virtual void DeviceChanged( + void DeviceChanged( bool added, const std::string& name, const local_discovery::DeviceDescription& description) override; - virtual void DeviceRemoved(const std::string& name) override; - virtual void DeviceCacheFlushed() override; + void DeviceRemoved(const std::string& name) override; + void DeviceCacheFlushed() override; void SendMessageInternal(int session_id, const std::string& api, @@ -197,14 +197,14 @@ class GcdPrivateRequest : public local_discovery::PrivetV3Session::Request { const base::DictionaryValue& input, const GcdPrivateAPIImpl::MessageResponseCallback& callback, GcdPrivateSessionHolder* session_holder); - virtual ~GcdPrivateRequest(); + ~GcdPrivateRequest() override; // local_discovery::PrivetV3Session::Request implementation. - virtual std::string GetName() override; - virtual const base::DictionaryValue& GetInput() override; - virtual void OnError() override; - virtual void OnParsedJson(const base::DictionaryValue& value, - bool has_error) override; + std::string GetName() override; + const base::DictionaryValue& GetInput() override; + void OnError() override; + void OnParsedJson(const base::DictionaryValue& value, + bool has_error) override; void RunCallback(gcd_private::Status status, const base::DictionaryValue& value); @@ -227,7 +227,7 @@ class GcdPrivateSessionHolder GcdPrivateSessionHolder(const std::string& ip_address, int port, net::URLRequestContextGetter* request_context); - virtual ~GcdPrivateSessionHolder(); + ~GcdPrivateSessionHolder() override; void Start(const ConfirmationCodeCallback& callback); @@ -243,10 +243,10 @@ class GcdPrivateSessionHolder private: // local_discovery::PrivetV3Session::Delegate implementation. - virtual void OnSetupConfirmationNeeded( + void OnSetupConfirmationNeeded( const std::string& confirmation_code, api::gcd_private::ConfirmationType confirmation_type) override; - virtual void OnSessionStatus(api::gcd_private::Status status) override; + void OnSessionStatus(api::gcd_private::Status status) override; scoped_ptr<local_discovery::PrivetHTTPClient> http_client_; scoped_ptr<local_discovery::PrivetV3Session> privet_session_; diff --git a/chrome/browser/extensions/api/gcd_private/gcd_private_api.h b/chrome/browser/extensions/api/gcd_private/gcd_private_api.h index bce1118..b0380ad 100644 --- a/chrome/browser/extensions/api/gcd_private/gcd_private_api.h +++ b/chrome/browser/extensions/api/gcd_private/gcd_private_api.h @@ -29,7 +29,7 @@ class GcdPrivateAPI : public BrowserContextKeyedAPI { }; explicit GcdPrivateAPI(content::BrowserContext* context); - virtual ~GcdPrivateAPI(); + ~GcdPrivateAPI() override; static void SetGCDApiFlowFactoryForTests(GCDApiFlowFactoryForTests* factory); @@ -56,15 +56,15 @@ class GcdPrivateGetCloudDeviceListFunction GcdPrivateGetCloudDeviceListFunction(); protected: - virtual ~GcdPrivateGetCloudDeviceListFunction(); + ~GcdPrivateGetCloudDeviceListFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: // CloudDeviceListDelegate implementation - virtual void OnDeviceListReady(const DeviceList& devices) override; - virtual void OnDeviceListUnavailable() override; + void OnDeviceListReady(const DeviceList& devices) override; + void OnDeviceListUnavailable() override; void CheckListingDone(); @@ -85,10 +85,10 @@ class GcdPrivateQueryForNewLocalDevicesFunction GcdPrivateQueryForNewLocalDevicesFunction(); protected: - virtual ~GcdPrivateQueryForNewLocalDevicesFunction(); + ~GcdPrivateQueryForNewLocalDevicesFunction() override; // SyncExtensionFunction overrides. - virtual bool RunSync() override; + bool RunSync() override; }; class GcdPrivatePrefetchWifiPasswordFunction @@ -100,10 +100,10 @@ class GcdPrivatePrefetchWifiPasswordFunction GcdPrivatePrefetchWifiPasswordFunction(); protected: - virtual ~GcdPrivatePrefetchWifiPasswordFunction(); + ~GcdPrivatePrefetchWifiPasswordFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; void OnResponse(bool response); }; @@ -117,10 +117,10 @@ class GcdPrivateGetPrefetchedWifiNameListFunction GcdPrivateGetPrefetchedWifiNameListFunction(); protected: - virtual ~GcdPrivateGetPrefetchedWifiNameListFunction(); + ~GcdPrivateGetPrefetchedWifiNameListFunction() override; // SyncExtensionFunction overrides. - virtual bool RunSync() override; + bool RunSync() override; }; class GcdPrivateEstablishSessionFunction : public ChromeAsyncExtensionFunction { @@ -131,10 +131,10 @@ class GcdPrivateEstablishSessionFunction : public ChromeAsyncExtensionFunction { GcdPrivateEstablishSessionFunction(); protected: - virtual ~GcdPrivateEstablishSessionFunction(); + ~GcdPrivateEstablishSessionFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnConfirmCodeCallback( @@ -151,10 +151,10 @@ class GcdPrivateConfirmCodeFunction : public ChromeAsyncExtensionFunction { GcdPrivateConfirmCodeFunction(); protected: - virtual ~GcdPrivateConfirmCodeFunction(); + ~GcdPrivateConfirmCodeFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnSessionEstablishedCallback(api::gcd_private::Status status); @@ -167,10 +167,10 @@ class GcdPrivateSendMessageFunction : public ChromeAsyncExtensionFunction { GcdPrivateSendMessageFunction(); protected: - virtual ~GcdPrivateSendMessageFunction(); + ~GcdPrivateSendMessageFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnMessageSentCallback(api::gcd_private::Status status, @@ -185,10 +185,10 @@ class GcdPrivateTerminateSessionFunction : public ChromeAsyncExtensionFunction { GcdPrivateTerminateSessionFunction(); protected: - virtual ~GcdPrivateTerminateSessionFunction(); + ~GcdPrivateTerminateSessionFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; }; class GcdPrivateGetCommandDefinitionsFunction @@ -200,10 +200,10 @@ class GcdPrivateGetCommandDefinitionsFunction GcdPrivateGetCommandDefinitionsFunction(); protected: - virtual ~GcdPrivateGetCommandDefinitionsFunction(); + ~GcdPrivateGetCommandDefinitionsFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: }; @@ -216,10 +216,10 @@ class GcdPrivateInsertCommandFunction : public ChromeAsyncExtensionFunction { GcdPrivateInsertCommandFunction(); protected: - virtual ~GcdPrivateInsertCommandFunction(); + ~GcdPrivateInsertCommandFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: }; @@ -231,10 +231,10 @@ class GcdPrivateGetCommandFunction : public ChromeAsyncExtensionFunction { GcdPrivateGetCommandFunction(); protected: - virtual ~GcdPrivateGetCommandFunction(); + ~GcdPrivateGetCommandFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: }; @@ -247,10 +247,10 @@ class GcdPrivateCancelCommandFunction : public ChromeAsyncExtensionFunction { GcdPrivateCancelCommandFunction(); protected: - virtual ~GcdPrivateCancelCommandFunction(); + ~GcdPrivateCancelCommandFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: }; @@ -263,10 +263,10 @@ class GcdPrivateGetCommandsListFunction : public ChromeAsyncExtensionFunction { GcdPrivateGetCommandsListFunction(); protected: - virtual ~GcdPrivateGetCommandsListFunction(); + ~GcdPrivateGetCommandsListFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: }; diff --git a/chrome/browser/extensions/api/gcd_private/gcd_private_apitest.cc b/chrome/browser/extensions/api/gcd_private/gcd_private_apitest.cc index e43f171..9f99360 100644 --- a/chrome/browser/extensions/api/gcd_private/gcd_private_apitest.cc +++ b/chrome/browser/extensions/api/gcd_private/gcd_private_apitest.cc @@ -173,11 +173,11 @@ class FakeGCDApiFlowFactory extensions::GcdPrivateAPI::SetGCDApiFlowFactoryForTests(this); } - virtual ~FakeGCDApiFlowFactory() { + ~FakeGCDApiFlowFactory() override { extensions::GcdPrivateAPI::SetGCDApiFlowFactoryForTests(NULL); } - virtual scoped_ptr<local_discovery::GCDApiFlow> CreateGCDApiFlow() override { + scoped_ptr<local_discovery::GCDApiFlow> CreateGCDApiFlow() override { return scoped_ptr<local_discovery::GCDApiFlow>(new FakeGCDApiFlow(this)); } @@ -191,9 +191,9 @@ class FakeGCDApiFlowFactory explicit FakeGCDApiFlow(FakeGCDApiFlowFactory* factory) : factory_(factory) {} - virtual ~FakeGCDApiFlow() {} + ~FakeGCDApiFlow() override {} - virtual void Start(scoped_ptr<Request> request) override { + void Start(scoped_ptr<Request> request) override { std::string response_str = factory_->responses_[request->GetURL()]; if (response_str == kResponseValueFailure) { @@ -228,7 +228,7 @@ class GcdPrivateAPITest : public ExtensionApiTest { #endif // ENABLE_MDNS } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( extensions::switches::kWhitelistedExtensionID, diff --git a/chrome/browser/extensions/api/gcm/gcm_api.h b/chrome/browser/extensions/api/gcm/gcm_api.h index 01a21cc..b6b33d2 100644 --- a/chrome/browser/extensions/api/gcm/gcm_api.h +++ b/chrome/browser/extensions/api/gcm/gcm_api.h @@ -23,10 +23,10 @@ class GcmApiFunction : public AsyncExtensionFunction { GcmApiFunction() {} protected: - virtual ~GcmApiFunction() {} + ~GcmApiFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override final; + bool RunAsync() final; // Actual implementation of specific functions. virtual bool DoWork() = 0; @@ -44,10 +44,10 @@ class GcmRegisterFunction : public GcmApiFunction { GcmRegisterFunction(); protected: - virtual ~GcmRegisterFunction(); + ~GcmRegisterFunction() override; // Register function implementation. - virtual bool DoWork() override final; + bool DoWork() final; private: void CompleteFunctionWithResult(const std::string& registration_id, @@ -61,10 +61,10 @@ class GcmUnregisterFunction : public GcmApiFunction { GcmUnregisterFunction(); protected: - virtual ~GcmUnregisterFunction(); + ~GcmUnregisterFunction() override; // Register function implementation. - virtual bool DoWork() override final; + bool DoWork() final; private: void CompleteFunctionWithResult(gcm::GCMClient::Result result); @@ -77,10 +77,10 @@ class GcmSendFunction : public GcmApiFunction { GcmSendFunction(); protected: - virtual ~GcmSendFunction(); + ~GcmSendFunction() override; // Send function implementation. - virtual bool DoWork() override final; + bool DoWork() final; private: void CompleteFunctionWithResult(const std::string& message_id, diff --git a/chrome/browser/extensions/api/gcm/gcm_apitest.cc b/chrome/browser/extensions/api/gcm/gcm_apitest.cc index 0889c1d..4ab4e24 100644 --- a/chrome/browser/extensions/api/gcm/gcm_apitest.cc +++ b/chrome/browser/extensions/api/gcm/gcm_apitest.cc @@ -61,8 +61,8 @@ class GcmApiTest : public ExtensionApiTest { GcmApiTest() : fake_gcm_profile_service_(NULL) {} protected: - virtual void SetUpCommandLine(CommandLine* command_line) override; - virtual void SetUpOnMainThread() override; + void SetUpCommandLine(CommandLine* command_line) override; + void SetUpOnMainThread() override; void StartCollecting(); diff --git a/chrome/browser/extensions/api/history/history_api.h b/chrome/browser/extensions/api/history/history_api.h index 1f89660..ccae66f 100644 --- a/chrome/browser/extensions/api/history/history_api.h +++ b/chrome/browser/extensions/api/history/history_api.h @@ -32,20 +32,20 @@ class HistoryEventRouter : public content::NotificationObserver, public history::HistoryServiceObserver { public: HistoryEventRouter(Profile* profile, HistoryService* history_service); - virtual ~HistoryEventRouter(); + ~HistoryEventRouter() override; private: // content::NotificationObserver::Observe. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // history::HistoryServiceObserver. - virtual void OnURLVisited(HistoryService* history_service, - ui::PageTransition transition, - const history::URLRow& row, - const history::RedirectList& redirects, - base::Time visit_time) override; + void OnURLVisited(HistoryService* history_service, + ui::PageTransition transition, + const history::URLRow& row, + const history::RedirectList& redirects, + base::Time visit_time) override; void HistoryUrlsRemoved(Profile* profile, const history::URLsDeletedDetails* details); @@ -66,16 +66,16 @@ class HistoryEventRouter : public content::NotificationObserver, class HistoryAPI : public BrowserContextKeyedAPI, public EventRouter::Observer { public: explicit HistoryAPI(content::BrowserContext* context); - virtual ~HistoryAPI(); + ~HistoryAPI() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<HistoryAPI>* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<HistoryAPI>; @@ -98,7 +98,7 @@ void BrowserContextKeyedAPIFactory<HistoryAPI>::DeclareFactoryDependencies(); // Base class for history function APIs. class HistoryFunction : public ChromeAsyncExtensionFunction { protected: - virtual ~HistoryFunction() {} + ~HistoryFunction() override {} bool ValidateUrl(const std::string& url_string, GURL* url); bool VerifyDeleteAllowed(); @@ -112,10 +112,10 @@ class HistoryFunctionWithCallback : public HistoryFunction { HistoryFunctionWithCallback(); protected: - virtual ~HistoryFunctionWithCallback(); + ~HistoryFunctionWithCallback() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; // Return true if the async call was completed, false otherwise. virtual bool RunAsyncImpl() = 0; @@ -138,10 +138,10 @@ class HistoryGetVisitsFunction : public HistoryFunctionWithCallback { DECLARE_EXTENSION_FUNCTION("history.getVisits", HISTORY_GETVISITS) protected: - virtual ~HistoryGetVisitsFunction() {} + ~HistoryGetVisitsFunction() override {} // HistoryFunctionWithCallback: - virtual bool RunAsyncImpl() override; + bool RunAsyncImpl() override; // Callback for the history function to provide results. void QueryComplete(bool success, @@ -154,10 +154,10 @@ class HistorySearchFunction : public HistoryFunctionWithCallback { DECLARE_EXTENSION_FUNCTION("history.search", HISTORY_SEARCH) protected: - virtual ~HistorySearchFunction() {} + ~HistorySearchFunction() override {} // HistoryFunctionWithCallback: - virtual bool RunAsyncImpl() override; + bool RunAsyncImpl() override; // Callback for the history function to provide results. void SearchComplete(history::QueryResults* results); @@ -168,10 +168,10 @@ class HistoryAddUrlFunction : public HistoryFunction { DECLARE_EXTENSION_FUNCTION("history.addUrl", HISTORY_ADDURL) protected: - virtual ~HistoryAddUrlFunction() {} + ~HistoryAddUrlFunction() override {} // HistoryFunctionWithCallback: - virtual bool RunAsync() override; + bool RunAsync() override; }; class HistoryDeleteAllFunction : public HistoryFunctionWithCallback { @@ -179,10 +179,10 @@ class HistoryDeleteAllFunction : public HistoryFunctionWithCallback { DECLARE_EXTENSION_FUNCTION("history.deleteAll", HISTORY_DELETEALL) protected: - virtual ~HistoryDeleteAllFunction() {} + ~HistoryDeleteAllFunction() override {} // HistoryFunctionWithCallback: - virtual bool RunAsyncImpl() override; + bool RunAsyncImpl() override; // Callback for the history service to acknowledge deletion. void DeleteComplete(); @@ -194,10 +194,10 @@ class HistoryDeleteUrlFunction : public HistoryFunction { DECLARE_EXTENSION_FUNCTION("history.deleteUrl", HISTORY_DELETEURL) protected: - virtual ~HistoryDeleteUrlFunction() {} + ~HistoryDeleteUrlFunction() override {} // HistoryFunctionWithCallback: - virtual bool RunAsync() override; + bool RunAsync() override; }; class HistoryDeleteRangeFunction : public HistoryFunctionWithCallback { @@ -205,10 +205,10 @@ class HistoryDeleteRangeFunction : public HistoryFunctionWithCallback { DECLARE_EXTENSION_FUNCTION("history.deleteRange", HISTORY_DELETERANGE) protected: - virtual ~HistoryDeleteRangeFunction() {} + ~HistoryDeleteRangeFunction() override {} // HistoryFunctionWithCallback: - virtual bool RunAsyncImpl() override; + bool RunAsyncImpl() override; // Callback for the history service to acknowledge deletion. void DeleteComplete(); diff --git a/chrome/browser/extensions/api/history/history_apitest.cc b/chrome/browser/extensions/api/history/history_apitest.cc index b3af0d8..ed42c8b 100644 --- a/chrome/browser/extensions/api/history/history_apitest.cc +++ b/chrome/browser/extensions/api/history/history_apitest.cc @@ -14,7 +14,7 @@ namespace extensions { class HistoryApiTest : public ExtensionApiTest { public: - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); host_resolver()->AddRule("www.a.com", "127.0.0.1"); diff --git a/chrome/browser/extensions/api/hotword_private/hotword_private_api.h b/chrome/browser/extensions/api/hotword_private/hotword_private_api.h index 9a7b371..790a88f 100644 --- a/chrome/browser/extensions/api/hotword_private/hotword_private_api.h +++ b/chrome/browser/extensions/api/hotword_private/hotword_private_api.h @@ -20,10 +20,10 @@ namespace extensions { class HotwordPrivateEventService : public BrowserContextKeyedAPI { public: explicit HotwordPrivateEventService(content::BrowserContext* context); - virtual ~HotwordPrivateEventService(); + ~HotwordPrivateEventService() override; // BrowserContextKeyedAPI implementation. - virtual void Shutdown() override; + void Shutdown() override; static BrowserContextKeyedAPIFactory<HotwordPrivateEventService>* GetFactoryInstance(); static const char* service_name(); @@ -50,10 +50,10 @@ class HotwordPrivateSetEnabledFunction : public ChromeSyncExtensionFunction { HOTWORDPRIVATE_SETENABLED) protected: - virtual ~HotwordPrivateSetEnabledFunction() {} + ~HotwordPrivateSetEnabledFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class HotwordPrivateSetAudioLoggingEnabledFunction @@ -63,10 +63,10 @@ class HotwordPrivateSetAudioLoggingEnabledFunction HOTWORDPRIVATE_SETAUDIOLOGGINGENABLED) protected: - virtual ~HotwordPrivateSetAudioLoggingEnabledFunction() {} + ~HotwordPrivateSetAudioLoggingEnabledFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class HotwordPrivateSetHotwordAlwaysOnSearchEnabledFunction @@ -76,10 +76,10 @@ class HotwordPrivateSetHotwordAlwaysOnSearchEnabledFunction HOTWORDPRIVATE_SETHOTWORDALWAYSONSEARCHENABLED) protected: - virtual ~HotwordPrivateSetHotwordAlwaysOnSearchEnabledFunction() {} + ~HotwordPrivateSetHotwordAlwaysOnSearchEnabledFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class HotwordPrivateGetStatusFunction : public ChromeSyncExtensionFunction { @@ -88,10 +88,10 @@ class HotwordPrivateGetStatusFunction : public ChromeSyncExtensionFunction { HOTWORDPRIVATE_GETSTATUS) protected: - virtual ~HotwordPrivateGetStatusFunction() {} + ~HotwordPrivateGetStatusFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class HotwordPrivateSetHotwordSessionStateFunction @@ -101,10 +101,10 @@ class HotwordPrivateSetHotwordSessionStateFunction HOTWORDPRIVATE_SETHOTWORDSESSIONSTATE); protected: - virtual ~HotwordPrivateSetHotwordSessionStateFunction() {} + ~HotwordPrivateSetHotwordSessionStateFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class HotwordPrivateNotifyHotwordRecognitionFunction @@ -114,10 +114,10 @@ class HotwordPrivateNotifyHotwordRecognitionFunction HOTWORDPRIVATE_NOTIFYHOTWORDRECOGNITION); protected: - virtual ~HotwordPrivateNotifyHotwordRecognitionFunction() {} + ~HotwordPrivateNotifyHotwordRecognitionFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class HotwordPrivateGetLaunchStateFunction : @@ -127,10 +127,10 @@ class HotwordPrivateGetLaunchStateFunction : HOTWORDPRIVATE_GETLAUNCHSTATE) protected: - virtual ~HotwordPrivateGetLaunchStateFunction() {} + ~HotwordPrivateGetLaunchStateFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc b/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc index def38dd..020c655 100644 --- a/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc +++ b/chrome/browser/extensions/api/hotword_private/hotword_private_apitest.cc @@ -24,11 +24,9 @@ class MockHotwordService : public HotwordService { public: explicit MockHotwordService(Profile* profile) : HotwordService(profile), service_available_(true) {}; - virtual ~MockHotwordService() {} + ~MockHotwordService() override {} - virtual bool IsServiceAvailable() override { - return service_available_; - } + bool IsServiceAvailable() override { return service_available_; } void setServiceAvailable(bool available) { service_available_ = available; @@ -38,7 +36,7 @@ class MockHotwordService : public HotwordService { return new MockHotwordService(static_cast<Profile*>(profile)); } - virtual LaunchMode GetHotwordAudioVerificationLaunchMode() override { + LaunchMode GetHotwordAudioVerificationLaunchMode() override { return launch_mode_; } @@ -61,16 +59,14 @@ class MockHotwordClient : public HotwordClient { recognized_count_(0) { } - virtual ~MockHotwordClient() {} + ~MockHotwordClient() override {} - virtual void OnHotwordStateChanged(bool enabled) override { + void OnHotwordStateChanged(bool enabled) override { last_enabled_ = enabled; state_changed_count_++; } - virtual void OnHotwordRecognized() override { - recognized_count_++; - } + void OnHotwordRecognized() override { recognized_count_++; } bool last_enabled() const { return last_enabled_; } int state_changed_count() const { return state_changed_count_; } @@ -89,7 +85,7 @@ class HotwordPrivateApiTest : public ExtensionApiTest { HotwordPrivateApiTest() {} virtual ~HotwordPrivateApiTest() {} - virtual void SetUpCommandLine(base::CommandLine* command_line) override { + void SetUpCommandLine(base::CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); // Whitelist the test extensions (which all share a common ID) to use @@ -98,7 +94,7 @@ class HotwordPrivateApiTest : public ExtensionApiTest { extensions::switches::kWhitelistedExtensionID, kHotwordTestExtensionId); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); test_data_dir_ = test_data_dir_.AppendASCII("hotword_private"); diff --git a/chrome/browser/extensions/api/i18n/i18n_api.h b/chrome/browser/extensions/api/i18n/i18n_api.h index f99e499..5863aaa 100644 --- a/chrome/browser/extensions/api/i18n/i18n_api.h +++ b/chrome/browser/extensions/api/i18n/i18n_api.h @@ -13,8 +13,8 @@ class Profile; namespace extensions { class I18nGetAcceptLanguagesFunction : public ChromeSyncExtensionFunction { - virtual ~I18nGetAcceptLanguagesFunction() {} - virtual bool RunSync() override; + ~I18nGetAcceptLanguagesFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("i18n.getAcceptLanguages", I18N_GETACCEPTLANGUAGES) }; diff --git a/chrome/browser/extensions/api/identity/gaia_web_auth_flow.h b/chrome/browser/extensions/api/identity/gaia_web_auth_flow.h index 364acd6..58e18f9a 100644 --- a/chrome/browser/extensions/api/identity/gaia_web_auth_flow.h +++ b/chrome/browser/extensions/api/identity/gaia_web_auth_flow.h @@ -64,19 +64,19 @@ class GaiaWebAuthFlow : public UbertokenConsumer, public WebAuthFlow::Delegate { const ExtensionTokenKey* token_key, const std::string& oauth2_client_id, const std::string& locale); - virtual ~GaiaWebAuthFlow(); + ~GaiaWebAuthFlow() override; // Starts the flow by fetching an ubertoken. Can override for testing. virtual void Start(); // UbertokenConsumer implementation: - virtual void OnUbertokenSuccess(const std::string& token) override; - virtual void OnUbertokenFailure(const GoogleServiceAuthError& error) override; + void OnUbertokenSuccess(const std::string& token) override; + void OnUbertokenFailure(const GoogleServiceAuthError& error) override; // WebAuthFlow::Delegate implementation. - virtual void OnAuthFlowFailure(WebAuthFlow::Failure failure) override; - virtual void OnAuthFlowURLChange(const GURL& redirect_url) override; - virtual void OnAuthFlowTitleChange(const std::string& title) override; + void OnAuthFlowFailure(WebAuthFlow::Failure failure) override; + void OnAuthFlowURLChange(const GURL& redirect_url) override; + void OnAuthFlowTitleChange(const std::string& title) override; private: // Creates a WebAuthFlow, which will navigate to |url|. Can override diff --git a/chrome/browser/extensions/api/identity/gaia_web_auth_flow_unittest.cc b/chrome/browser/extensions/api/identity/gaia_web_auth_flow_unittest.cc index 8b09815..555cff8 100644 --- a/chrome/browser/extensions/api/identity/gaia_web_auth_flow_unittest.cc +++ b/chrome/browser/extensions/api/identity/gaia_web_auth_flow_unittest.cc @@ -22,7 +22,7 @@ class FakeWebAuthFlow : public WebAuthFlow { GURL(), WebAuthFlow::INTERACTIVE) {} - virtual void Start() override {} + void Start() override {} }; class TestGaiaWebAuthFlow : public GaiaWebAuthFlow { @@ -34,7 +34,7 @@ class TestGaiaWebAuthFlow : public GaiaWebAuthFlow { : GaiaWebAuthFlow(delegate, NULL, token_key, oauth2_client_id, "en-us"), ubertoken_error_(ubertoken_error_state) {} - virtual void Start() override { + void Start() override { if (ubertoken_error_.state() == GoogleServiceAuthError::NONE) OnUbertokenSuccess("fake_ubertoken"); else @@ -42,7 +42,7 @@ class TestGaiaWebAuthFlow : public GaiaWebAuthFlow { } private: - virtual scoped_ptr<WebAuthFlow> CreateWebAuthFlow(GURL url) override { + scoped_ptr<WebAuthFlow> CreateWebAuthFlow(GURL url) override { return scoped_ptr<WebAuthFlow>(new FakeWebAuthFlow(this)); } diff --git a/chrome/browser/extensions/api/identity/identity_api.h b/chrome/browser/extensions/api/identity/identity_api.h index 85d2c84..489029c 100644 --- a/chrome/browser/extensions/api/identity/identity_api.h +++ b/chrome/browser/extensions/api/identity/identity_api.h @@ -93,7 +93,7 @@ class IdentityAPI : public BrowserContextKeyedAPI, }; explicit IdentityAPI(content::BrowserContext* context); - virtual ~IdentityAPI(); + ~IdentityAPI() override; // Request serialization queue for getAuthToken. IdentityMintRequestQueue* mint_queue(); @@ -113,14 +113,14 @@ class IdentityAPI : public BrowserContextKeyedAPI, std::string FindAccountKeyByGaiaId(const std::string& gaia_id); // BrowserContextKeyedAPI implementation. - virtual void Shutdown() override; + void Shutdown() override; static BrowserContextKeyedAPIFactory<IdentityAPI>* GetFactoryInstance(); // gaia::AccountTracker::Observer implementation: - virtual void OnAccountAdded(const gaia::AccountIds& ids) override; - virtual void OnAccountRemoved(const gaia::AccountIds& ids) override; - virtual void OnAccountSignInChanged(const gaia::AccountIds& ids, - bool is_signed_in) override; + void OnAccountAdded(const gaia::AccountIds& ids) override; + void OnAccountRemoved(const gaia::AccountIds& ids) override; + void OnAccountSignInChanged(const gaia::AccountIds& ids, + bool is_signed_in) override; void AddShutdownObserver(ShutdownObserver* observer); void RemoveShutdownObserver(ShutdownObserver* observer); @@ -153,10 +153,10 @@ class IdentityGetAccountsFunction : public ChromeUIThreadExtensionFunction { IdentityGetAccountsFunction(); private: - virtual ~IdentityGetAccountsFunction(); + ~IdentityGetAccountsFunction() override; // UIThreadExtensionFunction implementation. - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; // identity.getAuthToken fetches an OAuth 2 function for the @@ -194,28 +194,28 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction, } protected: - virtual ~IdentityGetAuthTokenFunction(); + ~IdentityGetAuthTokenFunction() override; // IdentitySigninFlow::Delegate implementation: - virtual void SigninSuccess() override; - virtual void SigninFailed() override; + void SigninSuccess() override; + void SigninFailed() override; // GaiaWebAuthFlow::Delegate implementation: - virtual void OnGaiaFlowFailure(GaiaWebAuthFlow::Failure failure, - GoogleServiceAuthError service_error, - const std::string& oauth_error) override; - virtual void OnGaiaFlowCompleted(const std::string& access_token, - const std::string& expiration) override; + void OnGaiaFlowFailure(GaiaWebAuthFlow::Failure failure, + GoogleServiceAuthError service_error, + const std::string& oauth_error) override; + void OnGaiaFlowCompleted(const std::string& access_token, + const std::string& expiration) override; // Starts a login access token request. virtual void StartLoginAccessTokenRequest(); // OAuth2TokenService::Consumer implementation: - virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) override; - virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) override; + void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) override; + void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) override; // Starts a mint token request to GAIA. // Exposed for testing. @@ -236,7 +236,7 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction, FRIEND_TEST_ALL_PREFIXES(GetAuthTokenFunctionTest, NoninteractiveShutdown); // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; // Helpers to report async function results to the caller. void StartAsyncRun(); @@ -250,18 +250,16 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction, void CompleteMintTokenFlow(); // IdentityMintRequestQueue::Request implementation: - virtual void StartMintToken(IdentityMintRequestQueue::MintType type) override; + void StartMintToken(IdentityMintRequestQueue::MintType type) override; // OAuth2MintTokenFlow::Delegate implementation: - virtual void OnMintTokenSuccess(const std::string& access_token, - int time_to_live) override; - virtual void OnMintTokenFailure( - const GoogleServiceAuthError& error) override; - virtual void OnIssueAdviceSuccess( - const IssueAdviceInfo& issue_advice) override; + void OnMintTokenSuccess(const std::string& access_token, + int time_to_live) override; + void OnMintTokenFailure(const GoogleServiceAuthError& error) override; + void OnIssueAdviceSuccess(const IssueAdviceInfo& issue_advice) override; // IdentityAPI::ShutdownObserver implementation: - virtual void OnShutdown() override; + void OnShutdown() override; #if defined(OS_CHROMEOS) // Starts a login access token request for device robot account. This method @@ -306,10 +304,10 @@ class IdentityGetProfileUserInfoFunction IdentityGetProfileUserInfoFunction(); private: - virtual ~IdentityGetProfileUserInfoFunction(); + ~IdentityGetProfileUserInfoFunction() override; // UIThreadExtensionFunction implementation. - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; class IdentityRemoveCachedAuthTokenFunction @@ -320,10 +318,10 @@ class IdentityRemoveCachedAuthTokenFunction IdentityRemoveCachedAuthTokenFunction(); protected: - virtual ~IdentityRemoveCachedAuthTokenFunction(); + ~IdentityRemoveCachedAuthTokenFunction() override; // SyncExtensionFunction implementation: - virtual bool RunSync() override; + bool RunSync() override; }; class IdentityLaunchWebAuthFlowFunction : public ChromeAsyncExtensionFunction, @@ -338,13 +336,13 @@ class IdentityLaunchWebAuthFlowFunction : public ChromeAsyncExtensionFunction, void InitFinalRedirectURLPrefixForTest(const std::string& extension_id); private: - virtual ~IdentityLaunchWebAuthFlowFunction(); - virtual bool RunAsync() override; + ~IdentityLaunchWebAuthFlowFunction() override; + bool RunAsync() override; // WebAuthFlow::Delegate implementation. - virtual void OnAuthFlowFailure(WebAuthFlow::Failure failure) override; - virtual void OnAuthFlowURLChange(const GURL& redirect_url) override; - virtual void OnAuthFlowTitleChange(const std::string& title) override {} + void OnAuthFlowFailure(WebAuthFlow::Failure failure) override; + void OnAuthFlowURLChange(const GURL& redirect_url) override; + void OnAuthFlowTitleChange(const std::string& title) override {} // Helper to initialize final URL prefix. void InitFinalRedirectURLPrefix(const std::string& extension_id); diff --git a/chrome/browser/extensions/api/identity/identity_apitest.cc b/chrome/browser/extensions/api/identity/identity_apitest.cc index c73cc0c..86d34e2 100644 --- a/chrome/browser/extensions/api/identity/identity_apitest.cc +++ b/chrome/browser/extensions/api/identity/identity_apitest.cc @@ -85,9 +85,9 @@ class SendResponseDelegate return *response_.get(); } - virtual void OnSendResponse(UIThreadExtensionFunction* function, - bool success, - bool bad_message) override { + void OnSendResponse(UIThreadExtensionFunction* function, + bool success, + bool bad_message) override { ASSERT_FALSE(bad_message); ASSERT_FALSE(HasResponse()); response_.reset(new bool); @@ -164,8 +164,8 @@ class TestHangOAuth2MintTokenFlow : public OAuth2MintTokenFlow { TestHangOAuth2MintTokenFlow() : OAuth2MintTokenFlow(NULL, OAuth2MintTokenFlow::Parameters()) {} - virtual void Start(net::URLRequestContextGetter* context, - const std::string& access_token) override { + void Start(net::URLRequestContextGetter* context, + const std::string& access_token) override { // Do nothing, simulating a hanging network call. } }; @@ -186,8 +186,8 @@ class TestOAuth2MintTokenFlow : public OAuth2MintTokenFlow { result_(result), delegate_(delegate) {} - virtual void Start(net::URLRequestContextGetter* context, - const std::string& access_token) override { + void Start(net::URLRequestContextGetter* context, + const std::string& access_token) override { switch (result_) { case ISSUE_ADVICE_SUCCESS: { IssueAdviceInfo info; @@ -235,9 +235,9 @@ class WaitForGURLAndCloseWindow : public content::WindowedNotificationObserver { url_(url) {} // NotificationObserver: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { content::NavigationController* web_auth_flow_controller = content::Source<content::NavigationController>(source).ptr(); content::WebContents* web_contents = @@ -316,7 +316,7 @@ class FakeGetAuthTokenFunction : public IdentityGetAuthTokenFunction { std::string login_access_token() const { return login_access_token_; } - virtual void StartLoginAccessTokenRequest() override { + void StartLoginAccessTokenRequest() override { if (auto_login_access_token_) { if (login_access_token_result_) { OnGetTokenSuccess(login_token_request_.get(), @@ -334,7 +334,7 @@ class FakeGetAuthTokenFunction : public IdentityGetAuthTokenFunction { } } - virtual void ShowLoginPopup() override { + void ShowLoginPopup() override { EXPECT_FALSE(login_ui_shown_); login_ui_shown_ = true; if (login_ui_result_) @@ -343,8 +343,7 @@ class FakeGetAuthTokenFunction : public IdentityGetAuthTokenFunction { SigninFailed(); } - virtual void ShowOAuthApprovalDialog( - const IssueAdviceInfo& issue_advice) override { + void ShowOAuthApprovalDialog(const IssueAdviceInfo& issue_advice) override { scope_ui_shown_ = true; if (scope_ui_result_) { @@ -358,8 +357,7 @@ class FakeGetAuthTokenFunction : public IdentityGetAuthTokenFunction { } } - virtual void StartGaiaRequest( - const std::string& login_access_token) override { + void StartGaiaRequest(const std::string& login_access_token) override { EXPECT_TRUE(login_access_token_.empty()); // Save the login token used in the mint token flow so tests can see // what account was used. @@ -367,12 +365,12 @@ class FakeGetAuthTokenFunction : public IdentityGetAuthTokenFunction { IdentityGetAuthTokenFunction::StartGaiaRequest(login_access_token); } - virtual OAuth2MintTokenFlow* CreateMintTokenFlow() override { + OAuth2MintTokenFlow* CreateMintTokenFlow() override { return flow_.release(); } private: - virtual ~FakeGetAuthTokenFunction() {} + ~FakeGetAuthTokenFunction() override {} bool login_access_token_result_; bool auto_login_access_token_; bool login_ui_result_; @@ -401,7 +399,7 @@ gaia::AccountIds CreateIds(std::string email, std::string obfid) { } class IdentityGetAccountsFunctionTest : public ExtensionBrowserTest { - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionBrowserTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kExtensionsMultiAccount); } @@ -513,7 +511,7 @@ IN_PROC_BROWSER_TEST_F(IdentityGetAccountsFunctionTest, TwoAccountsSignedIn) { class IdentityOldProfilesGetAccountsFunctionTest : public IdentityGetAccountsFunctionTest { - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { // Don't add the multi-account switch that parent class would have. } }; @@ -602,12 +600,12 @@ IN_PROC_BROWSER_TEST_F(IdentityGetProfileUserInfoFunctionTest, class GetAuthTokenFunctionTest : public AsyncExtensionBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { AsyncExtensionBrowserTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kExtensionsMultiAccount); } - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { AsyncExtensionBrowserTest::SetUpInProcessBrowserTestFixture(); will_create_browser_context_services_subscription_ = @@ -631,7 +629,7 @@ class GetAuthTokenFunctionTest : public AsyncExtensionBrowserTest { context, &FakeAccountReconcilor::Build); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { AsyncExtensionBrowserTest::SetUpOnMainThread(); // Grab references to the fake signin manager and token service. @@ -1659,7 +1657,7 @@ IN_PROC_BROWSER_TEST_F(RemoveCachedAuthTokenFunctionTest, MatchingToken) { class LaunchWebAuthFlowFunctionTest : public AsyncExtensionBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { AsyncExtensionBrowserTest::SetUpCommandLine(command_line); // Reduce performance test variance by disabling background networking. command_line->AppendSwitch(switches::kDisableBackgroundNetworking); diff --git a/chrome/browser/extensions/api/identity/identity_signin_flow.h b/chrome/browser/extensions/api/identity/identity_signin_flow.h index 9a0d646..5f443f5 100644 --- a/chrome/browser/extensions/api/identity/identity_signin_flow.h +++ b/chrome/browser/extensions/api/identity/identity_signin_flow.h @@ -34,13 +34,13 @@ class IdentitySigninFlow : public OAuth2TokenService::Observer { IdentitySigninFlow(Delegate* delegate, Profile* profile); - virtual ~IdentitySigninFlow(); + ~IdentitySigninFlow() override; // Starts the flow. Should only be called once. void Start(); // OAuth2TokenService::Observer implementation: - virtual void OnRefreshTokenAvailable(const std::string& account_id) override; + void OnRefreshTokenAvailable(const std::string& account_id) override; private: Delegate* delegate_; diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.h b/chrome/browser/extensions/api/identity/web_auth_flow.h index dccc5f0..b7b31aa 100644 --- a/chrome/browser/extensions/api/identity/web_auth_flow.h +++ b/chrome/browser/extensions/api/identity/web_auth_flow.h @@ -80,7 +80,7 @@ class WebAuthFlow : public content::NotificationObserver, const GURL& provider_url, Mode mode); - virtual ~WebAuthFlow(); + ~WebAuthFlow() override; // Starts the flow. virtual void Start(); @@ -92,31 +92,29 @@ class WebAuthFlow : public content::NotificationObserver, friend class ::WebAuthFlowTest; // ::AppWindowRegistry::Observer implementation. - virtual void OnAppWindowAdded(AppWindow* app_window) override; - virtual void OnAppWindowRemoved(AppWindow* app_window) override; + void OnAppWindowAdded(AppWindow* app_window) override; + void OnAppWindowRemoved(AppWindow* app_window) override; // NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // WebContentsObserver implementation. - virtual void DidStopLoading(content::RenderViewHost* render_view_host) - override; - virtual void DidNavigateMainFrame( + void DidStopLoading(content::RenderViewHost* render_view_host) override; + void DidNavigateMainFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) override; - virtual void RenderProcessGone(base::TerminationStatus status) override; - virtual void DidStartProvisionalLoadForFrame( + void RenderProcessGone(base::TerminationStatus status) override; + void DidStartProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, bool is_iframe_srcdoc) override; - virtual void DidFailProvisionalLoad( - content::RenderFrameHost* render_frame_host, - const GURL& validated_url, - int error_code, - const base::string16& error_description) override; + void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host, + const GURL& validated_url, + int error_code, + const base::string16& error_description) override; void BeforeUrlLoaded(const GURL& url); void AfterUrlLoaded(); diff --git a/chrome/browser/extensions/api/identity_private/identity_private_api.h b/chrome/browser/extensions/api/identity_private/identity_private_api.h index 6a1460d..893f580 100644 --- a/chrome/browser/extensions/api/identity_private/identity_private_api.h +++ b/chrome/browser/extensions/api/identity_private/identity_private_api.h @@ -16,10 +16,10 @@ class IdentityPrivateGetStringsFunction : public SyncExtensionFunction { IdentityPrivateGetStringsFunction(); protected: - virtual ~IdentityPrivateGetStringsFunction(); + ~IdentityPrivateGetStringsFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; private: DISALLOW_COPY_AND_ASSIGN(IdentityPrivateGetStringsFunction); diff --git a/chrome/browser/extensions/api/idle/idle_api.h b/chrome/browser/extensions/api/idle/idle_api.h index 005cc7d..f74f92b 100644 --- a/chrome/browser/extensions/api/idle/idle_api.h +++ b/chrome/browser/extensions/api/idle/idle_api.h @@ -16,10 +16,10 @@ class IdleQueryStateFunction : public ChromeAsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("idle.queryState", IDLE_QUERYSTATE) protected: - virtual ~IdleQueryStateFunction() {} + ~IdleQueryStateFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void IdleStateCallback(IdleState state); @@ -32,10 +32,10 @@ class IdleSetDetectionIntervalFunction : public ChromeSyncExtensionFunction { IDLE_SETDETECTIONINTERVAL) protected: - virtual ~IdleSetDetectionIntervalFunction() {} + ~IdleSetDetectionIntervalFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/idle/idle_api_unittest.cc b/chrome/browser/extensions/api/idle/idle_api_unittest.cc index 52edd52..d21b7d9 100644 --- a/chrome/browser/extensions/api/idle/idle_api_unittest.cc +++ b/chrome/browser/extensions/api/idle/idle_api_unittest.cc @@ -42,11 +42,10 @@ class MockEventDelegate : public IdleManager::EventDelegate { class TestIdleProvider : public IdleManager::IdleTimeProvider { public: TestIdleProvider(); - virtual ~TestIdleProvider(); - virtual void CalculateIdleState(int idle_threshold, - IdleCallback notify) override; - virtual void CalculateIdleTime(IdleTimeCallback notify) override; - virtual bool CheckIdleStateIsLocked() override; + ~TestIdleProvider() override; + void CalculateIdleState(int idle_threshold, IdleCallback notify) override; + void CalculateIdleTime(IdleTimeCallback notify) override; + bool CheckIdleStateIsLocked() override; void set_idle_time(int idle_time); void set_locked(bool locked); diff --git a/chrome/browser/extensions/api/idle/idle_manager.cc b/chrome/browser/extensions/api/idle/idle_manager.cc index 8520b38..c00bcc3 100644 --- a/chrome/browser/extensions/api/idle/idle_manager.cc +++ b/chrome/browser/extensions/api/idle/idle_manager.cc @@ -29,12 +29,12 @@ const int kPollInterval = 1; class DefaultEventDelegate : public IdleManager::EventDelegate { public: explicit DefaultEventDelegate(Profile* profile); - virtual ~DefaultEventDelegate(); + ~DefaultEventDelegate() override; - virtual void OnStateChanged(const std::string& extension_id, - IdleState new_state) override; - virtual void RegisterObserver(EventRouter::Observer* observer) override; - virtual void UnregisterObserver(EventRouter::Observer* observer) override; + void OnStateChanged(const std::string& extension_id, + IdleState new_state) override; + void RegisterObserver(EventRouter::Observer* observer) override; + void UnregisterObserver(EventRouter::Observer* observer) override; private: Profile* profile_; @@ -71,12 +71,11 @@ void DefaultEventDelegate::UnregisterObserver(EventRouter::Observer* observer) { class DefaultIdleProvider : public IdleManager::IdleTimeProvider { public: DefaultIdleProvider(); - virtual ~DefaultIdleProvider(); + ~DefaultIdleProvider() override; - virtual void CalculateIdleState(int idle_threshold, - IdleCallback notify) override; - virtual void CalculateIdleTime(IdleTimeCallback notify) override; - virtual bool CheckIdleStateIsLocked() override; + void CalculateIdleState(int idle_threshold, IdleCallback notify) override; + void CalculateIdleTime(IdleTimeCallback notify) override; + bool CheckIdleStateIsLocked() override; }; DefaultIdleProvider::DefaultIdleProvider() { diff --git a/chrome/browser/extensions/api/idle/idle_manager.h b/chrome/browser/extensions/api/idle/idle_manager.h index 8e96e27..a5a2bfc 100644 --- a/chrome/browser/extensions/api/idle/idle_manager.h +++ b/chrome/browser/extensions/api/idle/idle_manager.h @@ -69,22 +69,21 @@ class IdleManager : public ExtensionRegistryObserver, }; explicit IdleManager(Profile* profile); - virtual ~IdleManager(); + ~IdleManager() override; void Init(); // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // ExtensionRegistryObserver implementation. - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; void QueryState(int threshold, QueryStateCallback notify); void SetThreshold(const std::string& extension_id, int threshold); diff --git a/chrome/browser/extensions/api/idle/idle_manager_factory.h b/chrome/browser/extensions/api/idle/idle_manager_factory.h index ac4d005..b24843b 100644 --- a/chrome/browser/extensions/api/idle/idle_manager_factory.h +++ b/chrome/browser/extensions/api/idle/idle_manager_factory.h @@ -23,15 +23,15 @@ class IdleManagerFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<IdleManagerFactory>; IdleManagerFactory(); - virtual ~IdleManagerFactory(); + ~IdleManagerFactory() override; // BrowserContextKeyedBaseFactory implementation. - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsNULLWhileTesting() const override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/idltest/idltest_api.h b/chrome/browser/extensions/api/idltest/idltest_api.h index 19f6156..587664e 100644 --- a/chrome/browser/extensions/api/idltest/idltest_api.h +++ b/chrome/browser/extensions/api/idltest/idltest_api.h @@ -12,8 +12,8 @@ class IdltestSendArrayBufferFunction : public SyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("idltest.sendArrayBuffer", IDLTEST_SENDARRAYBUFFER) protected: - virtual ~IdltestSendArrayBufferFunction() {} - virtual bool RunSync() override; + ~IdltestSendArrayBufferFunction() override {} + bool RunSync() override; }; class IdltestSendArrayBufferViewFunction : public SyncExtensionFunction { @@ -22,8 +22,8 @@ class IdltestSendArrayBufferViewFunction : public SyncExtensionFunction { IDLTEST_SENDARRAYBUFFERVIEW) protected: - virtual ~IdltestSendArrayBufferViewFunction() {} - virtual bool RunSync() override; + ~IdltestSendArrayBufferViewFunction() override {} + bool RunSync() override; }; class IdltestGetArrayBufferFunction : public SyncExtensionFunction { @@ -31,8 +31,8 @@ class IdltestGetArrayBufferFunction : public SyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("idltest.getArrayBuffer", IDLTEST_GETARRAYBUFFER) protected: - virtual ~IdltestGetArrayBufferFunction() {} - virtual bool RunSync() override; + ~IdltestGetArrayBufferFunction() override {} + bool RunSync() override; }; #endif // CHROME_BROWSER_EXTENSIONS_API_IDLTEST_IDLTEST_API_H_ diff --git a/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.h b/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.h index 7d9a026..b01e513 100644 --- a/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.h +++ b/chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.h @@ -20,10 +20,10 @@ class DestroyPartitionsOperation : public Operation { DestroyPartitionsOperation(base::WeakPtr<OperationManager> manager, const ExtensionId& extension_id, const std::string& storage_unit_id); - virtual void StartImpl() override; + void StartImpl() override; private: - virtual ~DestroyPartitionsOperation(); + ~DestroyPartitionsOperation() override; }; } // namespace image_writer diff --git a/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.h b/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.h index e55150c..a7abf44 100644 --- a/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.h +++ b/chrome/browser/extensions/api/image_writer_private/image_writer_private_api.h @@ -18,8 +18,8 @@ class ImageWriterPrivateWriteFromUrlFunction ImageWriterPrivateWriteFromUrlFunction(); private: - virtual ~ImageWriterPrivateWriteFromUrlFunction(); - virtual bool RunAsync() override; + ~ImageWriterPrivateWriteFromUrlFunction() override; + bool RunAsync() override; void OnWriteStarted(bool success, const std::string& error); }; @@ -31,8 +31,8 @@ class ImageWriterPrivateWriteFromFileFunction ImageWriterPrivateWriteFromFileFunction(); private: - virtual ~ImageWriterPrivateWriteFromFileFunction(); - virtual bool RunAsync() override; + ~ImageWriterPrivateWriteFromFileFunction() override; + bool RunAsync() override; void OnWriteStarted(bool success, const std::string& error); }; @@ -44,8 +44,8 @@ class ImageWriterPrivateCancelWriteFunction ImageWriterPrivateCancelWriteFunction(); private: - virtual ~ImageWriterPrivateCancelWriteFunction(); - virtual bool RunAsync() override; + ~ImageWriterPrivateCancelWriteFunction() override; + bool RunAsync() override; void OnWriteCancelled(bool success, const std::string& error); }; @@ -57,8 +57,8 @@ class ImageWriterPrivateDestroyPartitionsFunction ImageWriterPrivateDestroyPartitionsFunction(); private: - virtual ~ImageWriterPrivateDestroyPartitionsFunction(); - virtual bool RunAsync() override; + ~ImageWriterPrivateDestroyPartitionsFunction() override; + bool RunAsync() override; void OnDestroyComplete(bool success, const std::string& error); }; @@ -70,8 +70,8 @@ class ImageWriterPrivateListRemovableStorageDevicesFunction ImageWriterPrivateListRemovableStorageDevicesFunction(); private: - virtual ~ImageWriterPrivateListRemovableStorageDevicesFunction(); - virtual bool RunAsync() override; + ~ImageWriterPrivateListRemovableStorageDevicesFunction() override; + bool RunAsync() override; void OnDeviceListReady(scoped_refptr<StorageDeviceList> device_list, bool success); }; diff --git a/chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc b/chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc index 9ba749a..a2efe15 100644 --- a/chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc +++ b/chrome/browser/extensions/api/image_writer_private/image_writer_private_apitest.cc @@ -18,7 +18,7 @@ using extensions::image_writer::FakeImageWriterClient; class ImageWriterPrivateApiTest : public ExtensionApiTest { public: - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); test_utils_.SetUp(true); @@ -61,7 +61,7 @@ class ImageWriterPrivateApiTest : public ExtensionApiTest { RemovableStorageProvider::SetDeviceListForTesting(device_list); } - virtual void TearDownInProcessBrowserTestFixture() override { + void TearDownInProcessBrowserTestFixture() override { ExtensionApiTest::TearDownInProcessBrowserTestFixture(); test_utils_.TearDown(); RemovableStorageProvider::ClearDeviceListForTesting(); diff --git a/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h b/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h index 215a77d..5e2d9b5 100644 --- a/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h +++ b/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h @@ -54,16 +54,16 @@ class ImageWriterUtilityClient : public content::UtilityProcessHostClient { protected: // It's a reference-counted object, so destructor is not public. - virtual ~ImageWriterUtilityClient(); + ~ImageWriterUtilityClient() override; private: // Ensures the UtilityProcessHost has been created. void StartHost(); // UtilityProcessHostClient implementation. - virtual void OnProcessCrashed(int exit_code) override; - virtual void OnProcessLaunchFailed() override; - virtual bool OnMessageReceived(const IPC::Message& message) override; + void OnProcessCrashed(int exit_code) override; + void OnProcessLaunchFailed() override; + bool OnMessageReceived(const IPC::Message& message) override; virtual bool Send(IPC::Message* msg); // IPC message handlers. diff --git a/chrome/browser/extensions/api/image_writer_private/operation_manager.h b/chrome/browser/extensions/api/image_writer_private/operation_manager.h index 95ebfeb..cf2d92b 100644 --- a/chrome/browser/extensions/api/image_writer_private/operation_manager.h +++ b/chrome/browser/extensions/api/image_writer_private/operation_manager.h @@ -47,9 +47,9 @@ class OperationManager : public BrowserContextKeyedAPI, typedef std::string ExtensionId; explicit OperationManager(content::BrowserContext* context); - virtual ~OperationManager(); + ~OperationManager() override; - virtual void Shutdown() override; + void Shutdown() override; // Starts a WriteFromUrl operation. void StartWriteFromUrl(const ExtensionId& extension_id, @@ -97,15 +97,14 @@ class OperationManager : public BrowserContextKeyedAPI, } // NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // ExtensionRegistryObserver implementation. - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; Operation* GetOperation(const ExtensionId& extension_id); void DeleteOperation(const ExtensionId& extension_id); diff --git a/chrome/browser/extensions/api/image_writer_private/operation_manager_unittest.cc b/chrome/browser/extensions/api/image_writer_private/operation_manager_unittest.cc index 243048f..dbb0aa5 100644 --- a/chrome/browser/extensions/api/image_writer_private/operation_manager_unittest.cc +++ b/chrome/browser/extensions/api/image_writer_private/operation_manager_unittest.cc @@ -27,9 +27,8 @@ class FakeEventRouter : public extensions::EventRouter { public: explicit FakeEventRouter(Profile* profile) : EventRouter(profile, NULL) {} - virtual void DispatchEventToExtension( - const std::string& extension_id, - scoped_ptr<extensions::Event> event) override { + void DispatchEventToExtension(const std::string& extension_id, + scoped_ptr<extensions::Event> event) override { // Do nothing with the event as no tests currently care. } }; @@ -42,9 +41,7 @@ class FakeExtensionSystem : public extensions::TestExtensionSystem { fake_event_router_.reset(new FakeEventRouter(profile)); } - virtual EventRouter* event_router() override { - return fake_event_router_.get(); - } + EventRouter* event_router() override { return fake_event_router_.get(); } private: scoped_ptr<FakeEventRouter> fake_event_router_; diff --git a/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc b/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc index e293236..4ec4290 100644 --- a/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc +++ b/chrome/browser/extensions/api/image_writer_private/operation_unittest.cc @@ -37,7 +37,7 @@ class OperationForTest : public Operation { const std::string& device_path) : Operation(manager_, extension_id, device_path) {} - virtual void StartImpl() override {} + void StartImpl() override {} // Expose internal stages for testing. void Unzip(const base::Closure& continuation) { @@ -60,7 +60,7 @@ class OperationForTest : public Operation { base::FilePath GetImagePath() { return image_path_; } private: - virtual ~OperationForTest() {}; + ~OperationForTest() override{}; }; class ImageWriterOperationTest : public ImageWriterUnitTestBase { diff --git a/chrome/browser/extensions/api/image_writer_private/test_utils.h b/chrome/browser/extensions/api/image_writer_private/test_utils.h index b4b7e7c6..bca303c 100644 --- a/chrome/browser/extensions/api/image_writer_private/test_utils.h +++ b/chrome/browser/extensions/api/image_writer_private/test_utils.h @@ -75,21 +75,21 @@ class FakeImageWriterClient : public ImageWriterUtilityClient { public: FakeImageWriterClient(); - virtual void Write(const ProgressCallback& progress_callback, - const SuccessCallback& success_callback, - const ErrorCallback& error_callback, - const base::FilePath& source, - const base::FilePath& target) override; + void Write(const ProgressCallback& progress_callback, + const SuccessCallback& success_callback, + const ErrorCallback& error_callback, + const base::FilePath& source, + const base::FilePath& target) override; - virtual void Verify(const ProgressCallback& progress_callback, - const SuccessCallback& success_callback, - const ErrorCallback& error_callback, - const base::FilePath& source, - const base::FilePath& target) override; + void Verify(const ProgressCallback& progress_callback, + const SuccessCallback& success_callback, + const ErrorCallback& error_callback, + const base::FilePath& source, + const base::FilePath& target) override; - virtual void Cancel(const CancelCallback& cancel_callback) override; + void Cancel(const CancelCallback& cancel_callback) override; - virtual void Shutdown() override; + void Shutdown() override; // Sets a callback for when a Write call is made. void SetWriteCallback(const base::Closure& write_callback); @@ -106,7 +106,7 @@ class FakeImageWriterClient : public ImageWriterUtilityClient { void Cancel(); private: - virtual ~FakeImageWriterClient(); + ~FakeImageWriterClient() override; ProgressCallback progress_callback_; SuccessCallback success_callback_; diff --git a/chrome/browser/extensions/api/image_writer_private/write_from_file_operation.h b/chrome/browser/extensions/api/image_writer_private/write_from_file_operation.h index 49ea47a..3f567ae 100644 --- a/chrome/browser/extensions/api/image_writer_private/write_from_file_operation.h +++ b/chrome/browser/extensions/api/image_writer_private/write_from_file_operation.h @@ -17,10 +17,10 @@ class WriteFromFileOperation : public Operation { const ExtensionId& extension_id, const base::FilePath& user_file_path, const std::string& storage_unit_id); - virtual void StartImpl() override; + void StartImpl() override; private: - virtual ~WriteFromFileOperation(); + ~WriteFromFileOperation() override; }; } // namespace image_writer diff --git a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h index 0b7ac73d..259af14 100644 --- a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h +++ b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h @@ -28,10 +28,10 @@ class WriteFromUrlOperation : public Operation, public net::URLFetcherDelegate { GURL url, const std::string& hash, const std::string& storage_unit_id); - virtual void StartImpl() override; + void StartImpl() override; protected: - virtual ~WriteFromUrlOperation(); + ~WriteFromUrlOperation() override; // Sets the image_path to the correct location to download to. void GetDownloadTarget(const base::Closure& continuation); @@ -51,13 +51,13 @@ class WriteFromUrlOperation : public Operation, public net::URLFetcherDelegate { void DestroyUrlFetcher(); // URLFetcherDelegate implementation. - virtual void OnURLFetchComplete(const net::URLFetcher* source) override; - virtual void OnURLFetchDownloadProgress(const net::URLFetcher* source, - int64 current, - int64 total) override; - virtual void OnURLFetchUploadProgress(const net::URLFetcher* source, - int64 current, - int64 total) override; + void OnURLFetchComplete(const net::URLFetcher* source) override; + void OnURLFetchDownloadProgress(const net::URLFetcher* source, + int64 current, + int64 total) override; + void OnURLFetchUploadProgress(const net::URLFetcher* source, + int64 current, + int64 total) override; void VerifyDownloadCompare(const base::Closure& continuation, const std::string& download_hash); diff --git a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc index 815be78..67a6da2 100644 --- a/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc +++ b/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc @@ -43,7 +43,7 @@ class OperationForTest : public WriteFromUrlOperation { hash, storage_unit_id) {} - virtual void StartImpl() override {} + void StartImpl() override {} // Expose stages for testing. void GetDownloadTarget(const base::Closure& continuation) { @@ -66,7 +66,7 @@ class OperationForTest : public WriteFromUrlOperation { base::FilePath GetImagePath() { return image_path_; } private: - virtual ~OperationForTest() {}; + ~OperationForTest() override{}; }; class ImageWriterWriteFromUrlOperationTest : public ImageWriterUnitTestBase { diff --git a/chrome/browser/extensions/api/input/input.h b/chrome/browser/extensions/api/input/input.h index 9cf8888..f9836f5 100644 --- a/chrome/browser/extensions/api/input/input.h +++ b/chrome/browser/extensions/api/input/input.h @@ -21,10 +21,10 @@ class VirtualKeyboardPrivateInsertTextFunction : public SyncExtensionFunction { VIRTUALKEYBOARDPRIVATE_INSERTTEXT); protected: - virtual ~VirtualKeyboardPrivateInsertTextFunction() {} + ~VirtualKeyboardPrivateInsertTextFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class VirtualKeyboardPrivateMoveCursorFunction : public SyncExtensionFunction { @@ -33,10 +33,10 @@ class VirtualKeyboardPrivateMoveCursorFunction : public SyncExtensionFunction { VIRTUALKEYBOARDPRIVATE_MOVECURSOR); protected: - virtual ~VirtualKeyboardPrivateMoveCursorFunction() {} + ~VirtualKeyboardPrivateMoveCursorFunction() override {} // ExtensionFunction. - virtual bool RunSync() override; + bool RunSync() override; }; class VirtualKeyboardPrivateSendKeyEventFunction @@ -47,10 +47,10 @@ class VirtualKeyboardPrivateSendKeyEventFunction VIRTUALKEYBOARDPRIVATE_SENDKEYEVENT); protected: - virtual ~VirtualKeyboardPrivateSendKeyEventFunction() {} + ~VirtualKeyboardPrivateSendKeyEventFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class VirtualKeyboardPrivateHideKeyboardFunction @@ -61,10 +61,10 @@ class VirtualKeyboardPrivateHideKeyboardFunction VIRTUALKEYBOARDPRIVATE_HIDEKEYBOARD); protected: - virtual ~VirtualKeyboardPrivateHideKeyboardFunction() {} + ~VirtualKeyboardPrivateHideKeyboardFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class VirtualKeyboardPrivateLockKeyboardFunction @@ -75,10 +75,10 @@ class VirtualKeyboardPrivateLockKeyboardFunction VIRTUALKEYBOARDPRIVATE_LOCKKEYBOARD); protected: - virtual ~VirtualKeyboardPrivateLockKeyboardFunction() {} + ~VirtualKeyboardPrivateLockKeyboardFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class VirtualKeyboardPrivateKeyboardLoadedFunction @@ -89,10 +89,10 @@ class VirtualKeyboardPrivateKeyboardLoadedFunction VIRTUALKEYBOARDPRIVATE_KEYBOARDLOADED); protected: - virtual ~VirtualKeyboardPrivateKeyboardLoadedFunction() {} + ~VirtualKeyboardPrivateKeyboardLoadedFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class VirtualKeyboardPrivateGetKeyboardConfigFunction @@ -103,10 +103,10 @@ class VirtualKeyboardPrivateGetKeyboardConfigFunction VIRTUALKEYBOARDPRIVATE_GETKEYBOARDCONFIG); protected: - virtual ~VirtualKeyboardPrivateGetKeyboardConfigFunction() {} + ~VirtualKeyboardPrivateGetKeyboardConfigFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class VirtualKeyboardPrivateOpenSettingsFunction @@ -116,17 +116,17 @@ class VirtualKeyboardPrivateOpenSettingsFunction VIRTUALKEYBOARDPRIVATE_OPENSETTINGS); protected: - virtual ~VirtualKeyboardPrivateOpenSettingsFunction() {} + ~VirtualKeyboardPrivateOpenSettingsFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class InputAPI : public BrowserContextKeyedAPI { public: explicit InputAPI(content::BrowserContext* context); - virtual ~InputAPI(); + ~InputAPI() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<InputAPI>* GetFactoryInstance(); diff --git a/chrome/browser/extensions/api/location/location_api.h b/chrome/browser/extensions/api/location/location_api.h index bfdbcc4d11..300b003 100644 --- a/chrome/browser/extensions/api/location/location_api.h +++ b/chrome/browser/extensions/api/location/location_api.h @@ -15,10 +15,10 @@ class LocationWatchLocationFunction : public ChromeSyncExtensionFunction { LOCATION_WATCHLOCATION) protected: - virtual ~LocationWatchLocationFunction() {} + ~LocationWatchLocationFunction() override {} // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class LocationClearWatchFunction : public ChromeSyncExtensionFunction { @@ -27,10 +27,10 @@ class LocationClearWatchFunction : public ChromeSyncExtensionFunction { LOCATION_CLEARWATCH) protected: - virtual ~LocationClearWatchFunction() {} + ~LocationClearWatchFunction() override {} // SyncExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/location/location_manager.cc b/chrome/browser/extensions/api/location/location_manager.cc index 3b5b985..1424701 100644 --- a/chrome/browser/extensions/api/location/location_manager.cc +++ b/chrome/browser/extensions/api/location/location_manager.cc @@ -57,8 +57,7 @@ class DistanceBasedUpdatePolicy : public UpdatePolicy { {} // UpdatePolicy Implementation - virtual bool ShouldSendUpdate(const content::Geoposition& position) const - override { + bool ShouldSendUpdate(const content::Geoposition& position) const override { return !last_updated_position_.Validate() || Distance(position.latitude, position.longitude, @@ -67,13 +66,12 @@ class DistanceBasedUpdatePolicy : public UpdatePolicy { distance_update_threshold_meters_; } - virtual void OnPositionReported(const content::Geoposition& position) - override { + void OnPositionReported(const content::Geoposition& position) override { last_updated_position_ = position; } private: - virtual ~DistanceBasedUpdatePolicy() {} + ~DistanceBasedUpdatePolicy() override {} // Calculates the distance between two latitude and longitude points. static double Distance(const double latitude1, @@ -117,17 +115,17 @@ class TimeBasedUpdatePolicy : public UpdatePolicy { {} // UpdatePolicy Implementation - virtual bool ShouldSendUpdate(const content::Geoposition&) const override { + bool ShouldSendUpdate(const content::Geoposition&) const override { return (base::Time::Now() - last_update_time_).InMilliseconds() > time_between_updates_ms_; } - virtual void OnPositionReported(const content::Geoposition&) override { + void OnPositionReported(const content::Geoposition&) override { last_update_time_ = base::Time::Now(); } private: - virtual ~TimeBasedUpdatePolicy() {} + ~TimeBasedUpdatePolicy() override {} base::Time last_update_time_; const double time_between_updates_ms_; diff --git a/chrome/browser/extensions/api/location/location_manager.h b/chrome/browser/extensions/api/location/location_manager.h index 24bb38b..f56c5c6 100644 --- a/chrome/browser/extensions/api/location/location_manager.h +++ b/chrome/browser/extensions/api/location/location_manager.h @@ -35,7 +35,7 @@ class LocationManager : public BrowserContextKeyedAPI, public ExtensionRegistryObserver { public: explicit LocationManager(content::BrowserContext* context); - virtual ~LocationManager(); + ~LocationManager() override; // Adds location request for the given extension, and starts the location // tracking. @@ -77,12 +77,11 @@ class LocationManager : public BrowserContextKeyedAPI, const content::Geoposition& position); // ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // BrowserContextKeyedAPI implementation. static const char* service_name() { return "LocationManager"; } diff --git a/chrome/browser/extensions/api/management/management_api.cc b/chrome/browser/extensions/api/management/management_api.cc index abd6d4d..f13f883 100644 --- a/chrome/browser/extensions/api/management/management_api.cc +++ b/chrome/browser/extensions/api/management/management_api.cc @@ -380,7 +380,7 @@ class SafeManifestJSONParser : public UtilityProcessHostClient { host->Send(new ChromeUtilityMsg_ParseJSON(manifest_)); } - virtual bool OnMessageReceived(const IPC::Message& message) override { + bool OnMessageReceived(const IPC::Message& message) override { bool handled = true; IPC_BEGIN_MESSAGE_MAP(SafeManifestJSONParser, message) IPC_MESSAGE_HANDLER(ChromeUtilityHostMsg_ParseJSON_Succeeded, @@ -426,7 +426,7 @@ class SafeManifestJSONParser : public UtilityProcessHostClient { } private: - virtual ~SafeManifestJSONParser() {} + ~SafeManifestJSONParser() override {} // The client who we'll report results back to. ManagementGetPermissionWarningsByManifestFunction* client_; diff --git a/chrome/browser/extensions/api/management/management_api.h b/chrome/browser/extensions/api/management/management_api.h index ff8ea11..93133f9 100644 --- a/chrome/browser/extensions/api/management/management_api.h +++ b/chrome/browser/extensions/api/management/management_api.h @@ -27,14 +27,14 @@ class ExtensionRegistry; class ManagementFunction : public ChromeSyncExtensionFunction { protected: - virtual ~ManagementFunction() {} + ~ManagementFunction() override {} ExtensionService* service(); }; class AsyncManagementFunction : public ChromeAsyncExtensionFunction { protected: - virtual ~AsyncManagementFunction() {} + ~AsyncManagementFunction() override {} ExtensionService* service(); }; @@ -44,10 +44,10 @@ class ManagementGetAllFunction : public ManagementFunction { DECLARE_EXTENSION_FUNCTION("management.getAll", MANAGEMENT_GETALL) protected: - virtual ~ManagementGetAllFunction() {} + ~ManagementGetAllFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ManagementGetFunction : public ManagementFunction { @@ -55,10 +55,10 @@ class ManagementGetFunction : public ManagementFunction { DECLARE_EXTENSION_FUNCTION("management.get", MANAGEMENT_GET) protected: - virtual ~ManagementGetFunction() {} + ~ManagementGetFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ManagementGetSelfFunction : public ManagementFunction { @@ -66,10 +66,10 @@ class ManagementGetSelfFunction : public ManagementFunction { DECLARE_EXTENSION_FUNCTION("management.getSelf", MANAGEMENT_GETSELF) protected: - virtual ~ManagementGetSelfFunction() {} + ~ManagementGetSelfFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ManagementGetPermissionWarningsByIdFunction : public ManagementFunction { @@ -78,10 +78,10 @@ class ManagementGetPermissionWarningsByIdFunction : public ManagementFunction { MANAGEMENT_GETPERMISSIONWARNINGSBYID) protected: - virtual ~ManagementGetPermissionWarningsByIdFunction() {} + ~ManagementGetPermissionWarningsByIdFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ManagementGetPermissionWarningsByManifestFunction @@ -96,10 +96,10 @@ class ManagementGetPermissionWarningsByManifestFunction void OnParseFailure(const std::string& error); protected: - virtual ~ManagementGetPermissionWarningsByManifestFunction() {} + ~ManagementGetPermissionWarningsByManifestFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; class ManagementLaunchAppFunction : public ManagementFunction { @@ -107,10 +107,10 @@ class ManagementLaunchAppFunction : public ManagementFunction { DECLARE_EXTENSION_FUNCTION("management.launchApp", MANAGEMENT_LAUNCHAPP) protected: - virtual ~ManagementLaunchAppFunction() {} + ~ManagementLaunchAppFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ManagementSetEnabledFunction : public AsyncManagementFunction, @@ -121,14 +121,14 @@ class ManagementSetEnabledFunction : public AsyncManagementFunction, ManagementSetEnabledFunction(); protected: - virtual ~ManagementSetEnabledFunction(); + ~ManagementSetEnabledFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; // ExtensionInstallPrompt::Delegate. - virtual void InstallUIProceed() override; - virtual void InstallUIAbort(bool user_initiated) override; + void InstallUIProceed() override; + void InstallUIAbort(bool user_initiated) override; private: std::string extension_id_; @@ -145,11 +145,11 @@ class ManagementUninstallFunctionBase : public AsyncManagementFunction, static void SetAutoConfirmForTest(bool should_proceed); // ExtensionUninstallDialog::Delegate implementation. - virtual void ExtensionUninstallAccepted() override; - virtual void ExtensionUninstallCanceled() override; + void ExtensionUninstallAccepted() override; + void ExtensionUninstallCanceled() override; protected: - virtual ~ManagementUninstallFunctionBase(); + ~ManagementUninstallFunctionBase() override; bool Uninstall(const std::string& extension_id, bool show_confirm_dialog); private: @@ -170,9 +170,9 @@ class ManagementUninstallFunction : public ManagementUninstallFunctionBase { ManagementUninstallFunction(); private: - virtual ~ManagementUninstallFunction(); + ~ManagementUninstallFunction() override; - virtual bool RunAsync() override; + bool RunAsync() override; }; class ManagementUninstallSelfFunction : public ManagementUninstallFunctionBase { @@ -183,9 +183,9 @@ class ManagementUninstallSelfFunction : public ManagementUninstallFunctionBase { ManagementUninstallSelfFunction(); private: - virtual ~ManagementUninstallSelfFunction(); + ~ManagementUninstallSelfFunction() override; - virtual bool RunAsync() override; + bool RunAsync() override; }; class ManagementCreateAppShortcutFunction : public AsyncManagementFunction { @@ -200,9 +200,9 @@ class ManagementCreateAppShortcutFunction : public AsyncManagementFunction { static void SetAutoConfirmForTest(bool should_proceed); protected: - virtual ~ManagementCreateAppShortcutFunction(); + ~ManagementCreateAppShortcutFunction() override; - virtual bool RunAsync() override; + bool RunAsync() override; }; class ManagementSetLaunchTypeFunction : public ManagementFunction { @@ -211,9 +211,9 @@ class ManagementSetLaunchTypeFunction : public ManagementFunction { MANAGEMENT_SETLAUNCHTYPE); protected: - virtual ~ManagementSetLaunchTypeFunction() {} + ~ManagementSetLaunchTypeFunction() override {} - virtual bool RunSync() override; + bool RunSync() override; }; class ManagementGenerateAppForLinkFunction : public AsyncManagementFunction { @@ -224,9 +224,9 @@ class ManagementGenerateAppForLinkFunction : public AsyncManagementFunction { ManagementGenerateAppForLinkFunction(); protected: - virtual ~ManagementGenerateAppForLinkFunction(); + ~ManagementGenerateAppForLinkFunction() override; - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnFaviconForApp(const favicon_base::FaviconImageResult& image_result); @@ -245,23 +245,21 @@ class ManagementGenerateAppForLinkFunction : public AsyncManagementFunction { class ManagementEventRouter : public ExtensionRegistryObserver { public: explicit ManagementEventRouter(content::BrowserContext* context); - virtual ~ManagementEventRouter(); + ~ManagementEventRouter() override; private: // ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; - virtual void OnExtensionInstalled(content::BrowserContext* browser_context, - const Extension* extension, - bool is_update) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; + void OnExtensionInstalled(content::BrowserContext* browser_context, + const Extension* extension, + bool is_update) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const Extension* extension, + extensions::UninstallReason reason) override; // Dispatches management api events to listening extensions. void BroadcastEvent(const Extension* extension, const char* event_name); @@ -278,16 +276,16 @@ class ManagementAPI : public BrowserContextKeyedAPI, public EventRouter::Observer { public: explicit ManagementAPI(content::BrowserContext* context); - virtual ~ManagementAPI(); + ~ManagementAPI() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<ManagementAPI>* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<ManagementAPI>; diff --git a/chrome/browser/extensions/api/management/management_api_browsertest.cc b/chrome/browser/extensions/api/management/management_api_browsertest.cc index 4b31cef..98fe3aa 100644 --- a/chrome/browser/extensions/api/management/management_api_browsertest.cc +++ b/chrome/browser/extensions/api/management/management_api_browsertest.cc @@ -215,7 +215,7 @@ class ExtensionManagementApiEscalationTest : // The id of the permissions escalation test extension we use. static const char kId[]; - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { EXPECT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); base::FilePath pem_path = test_data_dir_. AppendASCII("permissions_increase").AppendASCII("permissions.pem"); diff --git a/chrome/browser/extensions/api/management/management_apitest.cc b/chrome/browser/extensions/api/management/management_apitest.cc index 6b8623f..8bcab7c 100644 --- a/chrome/browser/extensions/api/management/management_apitest.cc +++ b/chrome/browser/extensions/api/management/management_apitest.cc @@ -43,7 +43,7 @@ Browser* FindOtherBrowser(Browser* browser) { class ExtensionManagementApiTest : public ExtensionApiTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kEnablePanels); } @@ -335,7 +335,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchType) { class ExtensionManagementApiStreamlinedAppsTest : public ExtensionManagementApiTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionManagementApiTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kEnableStreamlinedHostedApps); } diff --git a/chrome/browser/extensions/api/management/management_browsertest.cc b/chrome/browser/extensions/api/management/management_browsertest.cc index 11d591f..30f7a13 100644 --- a/chrome/browser/extensions/api/management/management_browsertest.cc +++ b/chrome/browser/extensions/api/management/management_browsertest.cc @@ -56,7 +56,7 @@ std::string BuildForceInstallPolicyValue(const char* extension_id, class ExtensionManagementTest : public ExtensionBrowserTest { public: - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { EXPECT_CALL(policy_provider_, IsInitializationComplete(_)) .WillRepeatedly(Return(true)); policy::BrowserPolicyConnector::SetPolicyProviderForTesting( @@ -216,7 +216,7 @@ class NotificationListener : public content::NotificationObserver { this, types[i], content::NotificationService::AllSources()); } } - virtual ~NotificationListener() {} + ~NotificationListener() override {} bool started() { return started_; } @@ -231,9 +231,9 @@ class NotificationListener : public content::NotificationObserver { } // Implements content::NotificationObserver interface. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { switch (type) { case extensions::NOTIFICATION_EXTENSION_UPDATING_STARTED: { EXPECT_FALSE(started_); diff --git a/chrome/browser/extensions/api/mdns/dns_sd_device_lister.h b/chrome/browser/extensions/api/mdns/dns_sd_device_lister.h index 6e0053c..2a98082 100644 --- a/chrome/browser/extensions/api/mdns/dns_sd_device_lister.h +++ b/chrome/browser/extensions/api/mdns/dns_sd_device_lister.h @@ -30,11 +30,11 @@ class DnsSdDeviceLister virtual void Discover(bool force_update); protected: - virtual void OnDeviceChanged( + void OnDeviceChanged( bool added, const local_discovery::ServiceDescription& service_description) override; - virtual void OnDeviceRemoved(const std::string& service_name) override; - virtual void OnDeviceCacheFlushed() override; + void OnDeviceRemoved(const std::string& service_name) override; + void OnDeviceCacheFlushed() override; private: // The delegate to notify of changes to services. diff --git a/chrome/browser/extensions/api/mdns/dns_sd_registry.h b/chrome/browser/extensions/api/mdns/dns_sd_registry.h index e6dc922..c85b1fc 100644 --- a/chrome/browser/extensions/api/mdns/dns_sd_registry.h +++ b/chrome/browser/extensions/api/mdns/dns_sd_registry.h @@ -89,12 +89,12 @@ class DnsSdRegistry : public DnsSdDelegate { local_discovery::ServiceDiscoverySharedClient* discovery_client); // DnsSdDelegate implementation: - virtual void ServiceChanged(const std::string& service_type, - bool added, - const DnsSdService& service) override; - virtual void ServiceRemoved(const std::string& service_type, - const std::string& service_name) override; - virtual void ServicesFlushed(const std::string& service_type) override; + void ServiceChanged(const std::string& service_type, + bool added, + const DnsSdService& service) override; + void ServiceRemoved(const std::string& service_type, + const std::string& service_name) override; + void ServicesFlushed(const std::string& service_type) override; DnsSdServiceTypeDataMap service_data_map_; diff --git a/chrome/browser/extensions/api/mdns/dns_sd_registry_unittest.cc b/chrome/browser/extensions/api/mdns/dns_sd_registry_unittest.cc index a40f85a..ba49ca9 100644 --- a/chrome/browser/extensions/api/mdns/dns_sd_registry_unittest.cc +++ b/chrome/browser/extensions/api/mdns/dns_sd_registry_unittest.cc @@ -13,15 +13,15 @@ namespace extensions { class MockDnsSdDeviceLister : public DnsSdDeviceLister { public: MockDnsSdDeviceLister() : DnsSdDeviceLister(NULL, NULL, "") {} - virtual ~MockDnsSdDeviceLister() {} + ~MockDnsSdDeviceLister() override {} - virtual void Discover(bool force_update) override {} + void Discover(bool force_update) override {} }; class TestDnsSdRegistry : public DnsSdRegistry { public: TestDnsSdRegistry() : DnsSdRegistry(NULL), delegate_(NULL) {} - virtual ~TestDnsSdRegistry() {} + ~TestDnsSdRegistry() override {} MockDnsSdDeviceLister* GetListerForService(const std::string& service_type) { return listers_[service_type]; @@ -39,11 +39,11 @@ class TestDnsSdRegistry : public DnsSdRegistry { } protected: - virtual DnsSdDeviceLister* CreateDnsSdDeviceLister( + DnsSdDeviceLister* CreateDnsSdDeviceLister( DnsSdDelegate* delegate, const std::string& service_type, local_discovery::ServiceDiscoverySharedClient* discovery_client) - override { + override { delegate_ = delegate; MockDnsSdDeviceLister* lister = new MockDnsSdDeviceLister(); listers_[service_type] = lister; diff --git a/chrome/browser/extensions/api/mdns/mdns_api.h b/chrome/browser/extensions/api/mdns/mdns_api.h index e659b0a..f232d3b 100644 --- a/chrome/browser/extensions/api/mdns/mdns_api.h +++ b/chrome/browser/extensions/api/mdns/mdns_api.h @@ -31,7 +31,7 @@ class MDnsAPI : public BrowserContextKeyedAPI, public DnsSdRegistry::DnsSdObserver { public: explicit MDnsAPI(content::BrowserContext* context); - virtual ~MDnsAPI(); + ~MDnsAPI() override; static MDnsAPI* Get(content::BrowserContext* context); @@ -49,13 +49,12 @@ class MDnsAPI : public BrowserContextKeyedAPI, friend class BrowserContextKeyedAPIFactory<MDnsAPI>; // EventRouter::Observer: - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; // DnsSdRegistry::Observer - virtual void OnDnsSdEvent( - const std::string& service_type, - const DnsSdRegistry::DnsSdServiceList& services) override; + void OnDnsSdEvent(const std::string& service_type, + const DnsSdRegistry::DnsSdServiceList& services) override; // BrowserContextKeyedAPI implementation. static const char* service_name() { diff --git a/chrome/browser/extensions/api/mdns/mdns_apitest.cc b/chrome/browser/extensions/api/mdns/mdns_apitest.cc index 5e4657a..00d3d8d 100644 --- a/chrome/browser/extensions/api/mdns/mdns_apitest.cc +++ b/chrome/browser/extensions/api/mdns/mdns_apitest.cc @@ -42,7 +42,7 @@ class MDnsAPITest : public ExtensionApiTest { public: MDnsAPITest() {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( extensions::switches::kWhitelistedExtensionID, diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc index 71ce7d6..d5f033d 100644 --- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc +++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.cc @@ -274,26 +274,26 @@ class SelectDirectoryDialog : public ui::SelectFileDialog::Listener, } // ui::SelectFileDialog::Listener implementation. - virtual void FileSelected(const base::FilePath& path, - int index, - void* params) override { + void FileSelected(const base::FilePath& path, + int index, + void* params) override { callback_.Run(path); Release(); // Balanced in Show(). } - virtual void MultiFilesSelected(const std::vector<base::FilePath>& files, - void* params) override { + void MultiFilesSelected(const std::vector<base::FilePath>& files, + void* params) override { NOTREACHED() << "Should not be able to select multiple files"; } - virtual void FileSelectionCanceled(void* params) override { + void FileSelectionCanceled(void* params) override { callback_.Run(base::FilePath()); Release(); // Balanced in Show(). } private: friend class base::RefCounted<SelectDirectoryDialog>; - virtual ~SelectDirectoryDialog() {} + ~SelectDirectoryDialog() override {} scoped_refptr<ui::SelectFileDialog> select_file_dialog_; WebContents* web_contents_; diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_api.h b/chrome/browser/extensions/api/media_galleries/media_galleries_api.h index f900ca7..95ab476 100644 --- a/chrome/browser/extensions/api/media_galleries/media_galleries_api.h +++ b/chrome/browser/extensions/api/media_galleries/media_galleries_api.h @@ -49,7 +49,7 @@ class MediaGalleriesEventRouter : public BrowserContextKeyedAPI, public extensions::EventRouter::Observer { public: // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<MediaGalleriesEventRouter>* @@ -62,13 +62,12 @@ class MediaGalleriesEventRouter : public BrowserContextKeyedAPI, bool ExtensionHasScanProgressListener(const std::string& extension_id) const; // MediaScanManagerObserver implementation. - virtual void OnScanStarted(const std::string& extension_id) override; - virtual void OnScanCancelled(const std::string& extension_id) override; - virtual void OnScanFinished( - const std::string& extension_id, - int gallery_count, - const MediaGalleryScanResult& file_counts) override; - virtual void OnScanError(const std::string& extension_id) override; + void OnScanStarted(const std::string& extension_id) override; + void OnScanCancelled(const std::string& extension_id) override; + void OnScanFinished(const std::string& extension_id, + int gallery_count, + const MediaGalleryScanResult& file_counts) override; + void OnScanError(const std::string& extension_id) override; private: friend class BrowserContextKeyedAPIFactory<MediaGalleriesEventRouter>; @@ -78,7 +77,7 @@ class MediaGalleriesEventRouter : public BrowserContextKeyedAPI, scoped_ptr<base::ListValue> event_args); explicit MediaGalleriesEventRouter(content::BrowserContext* context); - virtual ~MediaGalleriesEventRouter(); + ~MediaGalleriesEventRouter() override; // BrowserContextKeyedAPI implementation. static const char* service_name() { @@ -87,13 +86,13 @@ class MediaGalleriesEventRouter : public BrowserContextKeyedAPI, static const bool kServiceIsNULLWhileTesting = true; // GalleryWatchManagerObserver - virtual void OnGalleryChanged(const std::string& extension_id, - MediaGalleryPrefId gallery_id) override; - virtual void OnGalleryWatchDropped(const std::string& extension_id, - MediaGalleryPrefId gallery_id) override; + void OnGalleryChanged(const std::string& extension_id, + MediaGalleryPrefId gallery_id) override; + void OnGalleryWatchDropped(const std::string& extension_id, + MediaGalleryPrefId gallery_id) override; // extensions::EventRouter::Observer implementation. - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; // Current profile. Profile* profile_; @@ -110,8 +109,8 @@ class MediaGalleriesGetMediaFileSystemsFunction MEDIAGALLERIES_GETMEDIAFILESYSTEMS) protected: - virtual ~MediaGalleriesGetMediaFileSystemsFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesGetMediaFileSystemsFunction() override; + bool RunAsync() override; private: // Bottom half for RunAsync, invoked after the preferences is initialized. @@ -147,8 +146,8 @@ class MediaGalleriesGetAllMediaFileSystemMetadataFunction MEDIAGALLERIES_GETALLMEDIAFILESYSTEMMETADATA) protected: - virtual ~MediaGalleriesGetAllMediaFileSystemMetadataFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesGetAllMediaFileSystemMetadataFunction() override; + bool RunAsync() override; private: // Bottom half for RunAsync, invoked after the preferences is initialized. @@ -169,8 +168,8 @@ class MediaGalleriesAddUserSelectedFolderFunction MEDIAGALLERIES_ADDUSERSELECTEDFOLDER) protected: - virtual ~MediaGalleriesAddUserSelectedFolderFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesAddUserSelectedFolderFunction() override; + bool RunAsync() override; private: // Bottom half for RunAsync, invoked after the preferences is initialized. @@ -202,8 +201,8 @@ class MediaGalleriesDropPermissionForMediaFileSystemFunction MEDIAGALLERIES_DROPPERMISSIONFORMEDIAFILESYSTEM) protected: - virtual ~MediaGalleriesDropPermissionForMediaFileSystemFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesDropPermissionForMediaFileSystemFunction() override; + bool RunAsync() override; private: // Bottom half for RunAsync, invoked after the preferences is initialized. @@ -217,8 +216,8 @@ class MediaGalleriesStartMediaScanFunction MEDIAGALLERIES_STARTMEDIASCAN) protected: - virtual ~MediaGalleriesStartMediaScanFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesStartMediaScanFunction() override; + bool RunAsync() override; private: // Bottom half for RunAsync, invoked after the preferences is initialized. @@ -232,8 +231,8 @@ class MediaGalleriesCancelMediaScanFunction MEDIAGALLERIES_CANCELMEDIASCAN) protected: - virtual ~MediaGalleriesCancelMediaScanFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesCancelMediaScanFunction() override; + bool RunAsync() override; private: // Bottom half for RunAsync, invoked after the preferences is initialized. @@ -247,8 +246,8 @@ class MediaGalleriesAddScanResultsFunction MEDIAGALLERIES_ADDSCANRESULTS) protected: - virtual ~MediaGalleriesAddScanResultsFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesAddScanResultsFunction() override; + bool RunAsync() override; // Pulled out for testing. virtual MediaGalleriesScanResultController* MakeDialog( @@ -274,8 +273,8 @@ class MediaGalleriesGetMetadataFunction : public ChromeAsyncExtensionFunction { MEDIAGALLERIES_GETMETADATA) protected: - virtual ~MediaGalleriesGetMetadataFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesGetMetadataFunction() override; + bool RunAsync() override; private: // Bottom half for RunAsync, invoked after the preferences is initialized. @@ -305,8 +304,8 @@ class MediaGalleriesAddGalleryWatchFunction MEDIAGALLERIES_ADDGALLERYWATCH); protected: - virtual ~MediaGalleriesAddGalleryWatchFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesAddGalleryWatchFunction() override; + bool RunAsync() override; private: void OnPreferencesInit(const std::string& pref_id); @@ -322,8 +321,8 @@ class MediaGalleriesRemoveGalleryWatchFunction MEDIAGALLERIES_REMOVEGALLERYWATCH); protected: - virtual ~MediaGalleriesRemoveGalleryWatchFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesRemoveGalleryWatchFunction() override; + bool RunAsync() override; private: void OnPreferencesInit(const std::string& pref_id); @@ -336,8 +335,8 @@ class MediaGalleriesGetAllGalleryWatchFunction MEDIAGALLERIES_GETALLGALLERYWATCH); protected: - virtual ~MediaGalleriesGetAllGalleryWatchFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesGetAllGalleryWatchFunction() override; + bool RunAsync() override; private: void OnPreferencesInit(); @@ -350,8 +349,8 @@ class MediaGalleriesRemoveAllGalleryWatchFunction MEDIAGALLERIES_REMOVEALLGALLERYWATCH); protected: - virtual ~MediaGalleriesRemoveAllGalleryWatchFunction(); - virtual bool RunAsync() override; + ~MediaGalleriesRemoveAllGalleryWatchFunction() override; + bool RunAsync() override; private: void OnPreferencesInit(); diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc b/chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc index 0ad28cf..326c838 100644 --- a/chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc +++ b/chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc @@ -71,14 +71,14 @@ class DoNothingMediaFolderFinder : public MediaFolderFinder { const MediaFolderFinderResultsCallback& callback) : MediaFolderFinder(callback) { } - virtual ~DoNothingMediaFolderFinder() {} + ~DoNothingMediaFolderFinder() override {} static MediaFolderFinder* CreateDoNothingMediaFolderFinder( const MediaFolderFinderResultsCallback& callback) { return new DoNothingMediaFolderFinder(callback); } - virtual void StartScan() override {} + void StartScan() override {} private: }; @@ -93,10 +93,10 @@ class TestMediaGalleriesAddScanResultsFunction } protected: - virtual ~TestMediaGalleriesAddScanResultsFunction() {} + ~TestMediaGalleriesAddScanResultsFunction() override {} // Accepts the dialog as soon as it is created. - virtual MediaGalleriesScanResultController* MakeDialog( + MediaGalleriesScanResultController* MakeDialog( content::WebContents* web_contents, const extensions::Extension& extension, const base::Closure& on_finish) override { @@ -114,7 +114,7 @@ class MediaGalleriesPlatformAppBrowserTest : public PlatformAppBrowserTest { MediaGalleriesPlatformAppBrowserTest() : test_jpg_size_(0) {} virtual ~MediaGalleriesPlatformAppBrowserTest() {} - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { PlatformAppBrowserTest::SetUpOnMainThread(); ensure_media_directories_exists_.reset(new EnsureMediaDirectoriesExists); @@ -124,7 +124,7 @@ class MediaGalleriesPlatformAppBrowserTest : public PlatformAppBrowserTest { test_jpg_size_ = base::checked_cast<int>(file_size); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { ensure_media_directories_exists_.reset(); PlatformAppBrowserTest::TearDownOnMainThread(); } @@ -438,12 +438,12 @@ class MediaGalleriesPlatformAppBrowserTest : public PlatformAppBrowserTest { class MediaGalleriesPlatformAppPpapiTest : public MediaGalleriesPlatformAppBrowserTest { protected: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { MediaGalleriesPlatformAppBrowserTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kEnablePepperTesting); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { MediaGalleriesPlatformAppBrowserTest::SetUpOnMainThread(); ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &app_dir_)); diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_watch_apitest.cc b/chrome/browser/extensions/api/media_galleries/media_galleries_watch_apitest.cc index 7b7c987..89be45e 100644 --- a/chrome/browser/extensions/api/media_galleries/media_galleries_watch_apitest.cc +++ b/chrome/browser/extensions/api/media_galleries/media_galleries_watch_apitest.cc @@ -83,12 +83,12 @@ class MediaGalleriesGalleryWatchApiTest : public ExtensionApiTest { protected: // ExtensionApiTest overrides. - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( extensions::switches::kWhitelistedExtensionID, kTestExtensionId); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); ensure_media_directories_exists_.reset(new EnsureMediaDirectoriesExists); extension_ = LoadExtension(test_data_dir_.AppendASCII(kTestExtensionPath)); @@ -96,7 +96,7 @@ class MediaGalleriesGalleryWatchApiTest : public ExtensionApiTest { CreateTestGallery(); FetchMediaGalleriesList(); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { extension_ = NULL; background_host_ = NULL; ensure_media_directories_exists_.reset(); diff --git a/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.h b/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.h index 4cfb70f..b968870 100644 --- a/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.h +++ b/chrome/browser/extensions/api/media_galleries_private/gallery_watch_state_tracker.h @@ -37,7 +37,7 @@ class GalleryWatchStateTracker public MediaGalleriesPreferences::GalleryChangeObserver { public: explicit GalleryWatchStateTracker(Profile* profile); - virtual ~GalleryWatchStateTracker(); + ~GalleryWatchStateTracker() override; // Returns the GalleryWatchStateTracker associated with the |profile|. // Returns NULL if GalleryWatchStateTracker does not exists. @@ -56,16 +56,16 @@ class GalleryWatchStateTracker // Updates the state of the gallery watchers on the receipt of access // permission changed event for the extension specified by the // |extension_id|. - virtual void OnPermissionAdded(MediaGalleriesPreferences* pref, - const std::string& extension_id, - MediaGalleryPrefId gallery_id) override; + void OnPermissionAdded(MediaGalleriesPreferences* pref, + const std::string& extension_id, + MediaGalleryPrefId gallery_id) override; - virtual void OnPermissionRemoved(MediaGalleriesPreferences* pref, - const std::string& extension_id, - MediaGalleryPrefId gallery_id) override; + void OnPermissionRemoved(MediaGalleriesPreferences* pref, + const std::string& extension_id, + MediaGalleryPrefId gallery_id) override; - virtual void OnGalleryRemoved(MediaGalleriesPreferences* pref, - MediaGalleryPrefId gallery_id) override; + void OnGalleryRemoved(MediaGalleriesPreferences* pref, + MediaGalleryPrefId gallery_id) override; // Returns a set of watched gallery identifiers for the extension specified // by the |extension_id|. @@ -90,12 +90,11 @@ class GalleryWatchStateTracker typedef std::map<std::string, WatchedGalleriesMap> WatchedExtensionsMap; // extensions::ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) - override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // Syncs media gallery watch data for the given extension to/from the state // storage. diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h index 71363dc..c4784c2 100644 --- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h +++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h @@ -33,10 +33,10 @@ class MediaGalleriesPrivateAPI : public BrowserContextKeyedAPI, public EventRouter::Observer { public: explicit MediaGalleriesPrivateAPI(content::BrowserContext* context); - virtual ~MediaGalleriesPrivateAPI(); + ~MediaGalleriesPrivateAPI() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<MediaGalleriesPrivateAPI>* @@ -46,7 +46,7 @@ class MediaGalleriesPrivateAPI : public BrowserContextKeyedAPI, static MediaGalleriesPrivateAPI* Get(content::BrowserContext* context); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; MediaGalleriesPrivateEventRouter* GetEventRouter(); GalleryWatchStateTracker* GetGalleryWatchStateTracker(); @@ -85,10 +85,10 @@ class MediaGalleriesPrivateAddGalleryWatchFunction MEDIAGALLERIESPRIVATE_ADDGALLERYWATCH); protected: - virtual ~MediaGalleriesPrivateAddGalleryWatchFunction(); + ~MediaGalleriesPrivateAddGalleryWatchFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnPreferencesInit(const std::string& pref_id); @@ -105,10 +105,10 @@ class MediaGalleriesPrivateRemoveGalleryWatchFunction MEDIAGALLERIESPRIVATE_REMOVEGALLERYWATCH); protected: - virtual ~MediaGalleriesPrivateRemoveGalleryWatchFunction(); + ~MediaGalleriesPrivateRemoveGalleryWatchFunction() override; // SyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnPreferencesInit(const std::string& pref_id); @@ -121,10 +121,10 @@ class MediaGalleriesPrivateGetAllGalleryWatchFunction DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getAllGalleryWatch", MEDIAGALLERIESPRIVATE_GETALLGALLERYWATCH); protected: - virtual ~MediaGalleriesPrivateGetAllGalleryWatchFunction(); + ~MediaGalleriesPrivateGetAllGalleryWatchFunction() override; // SyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnPreferencesInit(); @@ -137,10 +137,10 @@ class MediaGalleriesPrivateRemoveAllGalleryWatchFunction DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeAllGalleryWatch", MEDIAGALLERIESPRIVATE_REMOVEALLGALLERYWATCH); protected: - virtual ~MediaGalleriesPrivateRemoveAllGalleryWatchFunction(); + ~MediaGalleriesPrivateRemoveAllGalleryWatchFunction() override; // SyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnPreferencesInit(); diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_watch_apitest.cc b/chrome/browser/extensions/api/media_galleries_private/media_galleries_watch_apitest.cc index 554a5b4..e5817e8 100644 --- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_watch_apitest.cc +++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_watch_apitest.cc @@ -79,13 +79,13 @@ class MediaGalleriesPrivateGalleryWatchApiTest : public ExtensionApiTest { protected: // ExtensionApiTest overrides. - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( extensions::switches::kWhitelistedExtensionID, kTestExtensionId); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); ensure_media_directories_exists_.reset(new EnsureMediaDirectoriesExists); extension_ = LoadExtension(test_data_dir_.AppendASCII(kTestExtensionPath)); @@ -93,7 +93,7 @@ class MediaGalleriesPrivateGalleryWatchApiTest : public ExtensionApiTest { CreateTestGallery(); FetchMediaGalleriesList(); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { extension_ = NULL; background_host_ = NULL; ensure_media_directories_exists_.reset(); diff --git a/chrome/browser/extensions/api/messaging/extension_message_port.h b/chrome/browser/extensions/api/messaging/extension_message_port.h index a10c031..f427e23d 100644 --- a/chrome/browser/extensions/api/messaging/extension_message_port.h +++ b/chrome/browser/extensions/api/messaging/extension_message_port.h @@ -21,21 +21,19 @@ class ExtensionMessagePort : public MessageService::MessagePort { ExtensionMessagePort(content::RenderProcessHost* process, int routing_id, const std::string& extension_id); - virtual void DispatchOnConnect( - int dest_port_id, - const std::string& channel_name, - const base::DictionaryValue& source_tab, - const std::string& source_extension_id, - const std::string& target_extension_id, - const GURL& source_url, - const std::string& tls_channel_id) override; - virtual void DispatchOnDisconnect(int source_port_id, - const std::string& error_message) override; - virtual void DispatchOnMessage(const Message& message, - int target_port_id) override; - virtual void IncrementLazyKeepaliveCount() override; - virtual void DecrementLazyKeepaliveCount() override; - virtual content::RenderProcessHost* GetRenderProcessHost() override; + void DispatchOnConnect(int dest_port_id, + const std::string& channel_name, + const base::DictionaryValue& source_tab, + const std::string& source_extension_id, + const std::string& target_extension_id, + const GURL& source_url, + const std::string& tls_channel_id) override; + void DispatchOnDisconnect(int source_port_id, + const std::string& error_message) override; + void DispatchOnMessage(const Message& message, int target_port_id) override; + void IncrementLazyKeepaliveCount() override; + void DecrementLazyKeepaliveCount() override; + content::RenderProcessHost* GetRenderProcessHost() override; private: content::RenderProcessHost* process_; diff --git a/chrome/browser/extensions/api/messaging/incognito_connectability.h b/chrome/browser/extensions/api/messaging/incognito_connectability.h index 02e8e25..28d9bcb 100644 --- a/chrome/browser/extensions/api/messaging/incognito_connectability.h +++ b/chrome/browser/extensions/api/messaging/incognito_connectability.h @@ -64,7 +64,7 @@ class IncognitoConnectability : public BrowserContextKeyedAPI { friend class BrowserContextKeyedAPIFactory<IncognitoConnectability>; explicit IncognitoConnectability(content::BrowserContext* context); - virtual ~IncognitoConnectability(); + ~IncognitoConnectability() override; typedef std::map<std::string, std::set<GURL> > ExtensionToOriginsMap; diff --git a/chrome/browser/extensions/api/messaging/message_service.h b/chrome/browser/extensions/api/messaging/message_service.h index 23bf7e8..6dcde00 100644 --- a/chrome/browser/extensions/api/messaging/message_service.h +++ b/chrome/browser/extensions/api/messaging/message_service.h @@ -119,7 +119,7 @@ class MessageService : public BrowserContextKeyedAPI, static void AllocatePortIdPair(int* port1, int* port2); explicit MessageService(content::BrowserContext* context); - virtual ~MessageService(); + ~MessageService() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<MessageService>* GetFactoryInstance(); @@ -196,9 +196,9 @@ class MessageService : public BrowserContextKeyedAPI, void AddChannel(MessageChannel* channel, int receiver_port_id); // content::NotificationObserver interface. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // A process that might be in our list of channels has closed. void OnProcessClosed(content::RenderProcessHost* process); diff --git a/chrome/browser/extensions/api/messaging/native_message_port.cc b/chrome/browser/extensions/api/messaging/native_message_port.cc index 3bd403a..31c5502 100644 --- a/chrome/browser/extensions/api/messaging/native_message_port.cc +++ b/chrome/browser/extensions/api/messaging/native_message_port.cc @@ -22,13 +22,13 @@ class NativeMessagePort::Core : public NativeMessageHost::Client { scoped_ptr<NativeMessageHost> host, base::WeakPtr<NativeMessagePort> port, scoped_refptr<base::SingleThreadTaskRunner> message_service_task_runner_); - virtual ~Core(); + ~Core() override; void OnMessageFromChrome(const std::string& message); // NativeMessageHost::Client implementation. - virtual void PostMessageFromNativeHost(const std::string& message) override; - virtual void CloseChannel(const std::string& error_message) override; + void PostMessageFromNativeHost(const std::string& message) override; + void CloseChannel(const std::string& error_message) override; private: scoped_ptr<NativeMessageHost> host_; diff --git a/chrome/browser/extensions/api/messaging/native_message_port.h b/chrome/browser/extensions/api/messaging/native_message_port.h index 65711ae..438b317 100644 --- a/chrome/browser/extensions/api/messaging/native_message_port.h +++ b/chrome/browser/extensions/api/messaging/native_message_port.h @@ -18,11 +18,11 @@ class NativeMessagePort : public MessageService::MessagePort { NativeMessagePort(base::WeakPtr<MessageService> message_service, int port_id, scoped_ptr<NativeMessageHost> native_message_host); - virtual ~NativeMessagePort(); + ~NativeMessagePort() override; // MessageService::MessagePort implementation. - virtual void DispatchOnMessage(const Message& message, - int target_port_id) override; + void DispatchOnMessage(const Message& message, int target_port_id) override; + private: class Core; void PostMessageFromNativeHost(const std::string& message); diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.h b/chrome/browser/extensions/api/messaging/native_message_process_host.h index b730277..fb00a5c 100644 --- a/chrome/browser/extensions/api/messaging/native_message_process_host.h +++ b/chrome/browser/extensions/api/messaging/native_message_process_host.h @@ -39,7 +39,7 @@ class NativeMessageProcessHost : #endif // !defined(OS_POSIX) public NativeMessageHost { public: - virtual ~NativeMessageProcessHost(); + ~NativeMessageProcessHost() override; // Create using specified |launcher|. Used in tests. static scoped_ptr<NativeMessageHost> CreateWithLauncher( @@ -48,15 +48,14 @@ class NativeMessageProcessHost : scoped_ptr<NativeProcessLauncher> launcher); // extensions::NativeMessageHost implementation. - virtual void OnMessage(const std::string& message) override; - virtual void Start(Client* client) override; - virtual scoped_refptr<base::SingleThreadTaskRunner> task_runner() - const override; + void OnMessage(const std::string& message) override; + void Start(Client* client) override; + scoped_refptr<base::SingleThreadTaskRunner> task_runner() const override; #if defined(OS_POSIX) // MessageLoopForIO::Watcher interface - virtual void OnFileCanReadWithoutBlocking(int fd) override; - virtual void OnFileCanWriteWithoutBlocking(int fd) override; + void OnFileCanReadWithoutBlocking(int fd) override; + void OnFileCanWriteWithoutBlocking(int fd) override; #endif // !defined(OS_POSIX) // Try and read a single message from |read_file_|. This should only be called diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc index 958c9c5..39ab93e 100644 --- a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc +++ b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc @@ -78,9 +78,9 @@ class FakeLauncher : public NativeProcessLauncher { base::File(write_file, write_flags))); } - virtual void Launch(const GURL& origin, - const std::string& native_host_name, - LaunchedCallback callback) const override { + void Launch(const GURL& origin, + const std::string& native_host_name, + LaunchedCallback callback) const override { callback.Run(NativeProcessLauncher::RESULT_SUCCESS, base::kNullProcessHandle, read_file_.Pass(), write_file_.Pass()); @@ -112,7 +112,7 @@ class NativeMessagingTest : public ::testing::Test, base::RunLoop().RunUntilIdle(); } - virtual void PostMessageFromNativeHost(const std::string& message) override { + void PostMessageFromNativeHost(const std::string& message) override { last_message_ = message; // Parse the message. @@ -130,7 +130,7 @@ class NativeMessagingTest : public ::testing::Test, run_loop_->Quit(); } - virtual void CloseChannel(const std::string& error_message) override { + void CloseChannel(const std::string& error_message) override { channel_closed_ = true; if (run_loop_) run_loop_->Quit(); diff --git a/chrome/browser/extensions/api/messaging/native_messaging_policy_handler.h b/chrome/browser/extensions/api/messaging/native_messaging_policy_handler.h index fc099e4..220c7c4 100644 --- a/chrome/browser/extensions/api/messaging/native_messaging_policy_handler.h +++ b/chrome/browser/extensions/api/messaging/native_messaging_policy_handler.h @@ -24,13 +24,13 @@ class NativeMessagingHostListPolicyHandler NativeMessagingHostListPolicyHandler(const char* policy_name, const char* pref_path, bool allow_wildcards); - virtual ~NativeMessagingHostListPolicyHandler(); + ~NativeMessagingHostListPolicyHandler() override; // ConfigurationPolicyHandler methods: - virtual bool CheckPolicySettings(const policy::PolicyMap& policies, - policy::PolicyErrorMap* errors) override; - virtual void ApplyPolicySettings(const policy::PolicyMap& policies, - PrefValueMap* prefs) override; + bool CheckPolicySettings(const policy::PolicyMap& policies, + policy::PolicyErrorMap* errors) override; + void ApplyPolicySettings(const policy::PolicyMap& policies, + PrefValueMap* prefs) override; protected: const char* pref_path() const; diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher.cc b/chrome/browser/extensions/api/messaging/native_process_launcher.cc index 8073b79..dabcbb3 100644 --- a/chrome/browser/extensions/api/messaging/native_process_launcher.cc +++ b/chrome/browser/extensions/api/messaging/native_process_launcher.cc @@ -39,11 +39,11 @@ class NativeProcessLauncherImpl : public NativeProcessLauncher { public: NativeProcessLauncherImpl(bool allow_user_level_hosts, intptr_t native_window); - virtual ~NativeProcessLauncherImpl(); + ~NativeProcessLauncherImpl() override; - virtual void Launch(const GURL& origin, - const std::string& native_host_name, - LaunchedCallback callback) const override; + void Launch(const GURL& origin, + const std::string& native_host_name, + LaunchedCallback callback) const override; private: class Core : public base::RefCountedThreadSafe<Core> { diff --git a/chrome/browser/extensions/api/metrics_private/metrics_private_api.h b/chrome/browser/extensions/api/metrics_private/metrics_private_api.h index 1eb5eb0..631132e 100644 --- a/chrome/browser/extensions/api/metrics_private/metrics_private_api.h +++ b/chrome/browser/extensions/api/metrics_private/metrics_private_api.h @@ -19,10 +19,10 @@ class MetricsPrivateGetIsCrashReportingEnabledFunction METRICSPRIVATE_GETISCRASHRECORDINGENABLED) protected: - virtual ~MetricsPrivateGetIsCrashReportingEnabledFunction() {} + ~MetricsPrivateGetIsCrashReportingEnabledFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateGetFieldTrialFunction : public SyncExtensionFunction { @@ -31,10 +31,10 @@ class MetricsPrivateGetFieldTrialFunction : public SyncExtensionFunction { METRICSPRIVATE_GETFIELDTRIAL) protected: - virtual ~MetricsPrivateGetFieldTrialFunction() {} + ~MetricsPrivateGetFieldTrialFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateGetVariationParamsFunction : public SyncExtensionFunction { @@ -43,10 +43,10 @@ class MetricsPrivateGetVariationParamsFunction : public SyncExtensionFunction { METRICSPRIVATE_GETVARIATIONPARAMS) protected: - virtual ~MetricsPrivateGetVariationParamsFunction() {} + ~MetricsPrivateGetVariationParamsFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateRecordUserActionFunction : public SyncExtensionFunction { @@ -55,15 +55,15 @@ class MetricsPrivateRecordUserActionFunction : public SyncExtensionFunction { METRICSPRIVATE_RECORDUSERACTION) protected: - virtual ~MetricsPrivateRecordUserActionFunction() {} + ~MetricsPrivateRecordUserActionFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsHistogramHelperFunction : public SyncExtensionFunction { protected: - virtual ~MetricsHistogramHelperFunction() {} + ~MetricsHistogramHelperFunction() override {} virtual bool RecordValue(const std::string& name, base::HistogramType type, int min, int max, size_t buckets, @@ -77,10 +77,10 @@ class MetricsPrivateRecordValueFunction METRICSPRIVATE_RECORDVALUE) protected: - virtual ~MetricsPrivateRecordValueFunction() {} + ~MetricsPrivateRecordValueFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateRecordSparseValueFunction @@ -90,10 +90,10 @@ class MetricsPrivateRecordSparseValueFunction METRICSPRIVATE_RECORDSPARSEVALUE) protected: - virtual ~MetricsPrivateRecordSparseValueFunction() {} + ~MetricsPrivateRecordSparseValueFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateRecordPercentageFunction @@ -103,10 +103,10 @@ class MetricsPrivateRecordPercentageFunction METRICSPRIVATE_RECORDPERCENTAGE) protected: - virtual ~MetricsPrivateRecordPercentageFunction() {} + ~MetricsPrivateRecordPercentageFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateRecordCountFunction @@ -116,10 +116,10 @@ class MetricsPrivateRecordCountFunction METRICSPRIVATE_RECORDCOUNT) protected: - virtual ~MetricsPrivateRecordCountFunction() {} + ~MetricsPrivateRecordCountFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateRecordSmallCountFunction @@ -129,10 +129,10 @@ class MetricsPrivateRecordSmallCountFunction METRICSPRIVATE_RECORDSMALLCOUNT) protected: - virtual ~MetricsPrivateRecordSmallCountFunction() {} + ~MetricsPrivateRecordSmallCountFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateRecordMediumCountFunction @@ -142,10 +142,10 @@ class MetricsPrivateRecordMediumCountFunction METRICSPRIVATE_RECORDMEDIUMCOUNT) protected: - virtual ~MetricsPrivateRecordMediumCountFunction() {} + ~MetricsPrivateRecordMediumCountFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateRecordTimeFunction : public MetricsHistogramHelperFunction { @@ -154,10 +154,10 @@ class MetricsPrivateRecordTimeFunction : public MetricsHistogramHelperFunction { METRICSPRIVATE_RECORDTIME) protected: - virtual ~MetricsPrivateRecordTimeFunction() {} + ~MetricsPrivateRecordTimeFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateRecordMediumTimeFunction @@ -167,10 +167,10 @@ class MetricsPrivateRecordMediumTimeFunction METRICSPRIVATE_RECORDMEDIUMTIME) protected: - virtual ~MetricsPrivateRecordMediumTimeFunction() {} + ~MetricsPrivateRecordMediumTimeFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class MetricsPrivateRecordLongTimeFunction @@ -180,10 +180,10 @@ class MetricsPrivateRecordLongTimeFunction METRICSPRIVATE_RECORDLONGTIME) protected: - virtual ~MetricsPrivateRecordLongTimeFunction() {} + ~MetricsPrivateRecordLongTimeFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/module/module.h b/chrome/browser/extensions/api/module/module.h index 76b096a..c352499 100644 --- a/chrome/browser/extensions/api/module/module.h +++ b/chrome/browser/extensions/api/module/module.h @@ -22,10 +22,10 @@ class ExtensionSetUpdateUrlDataFunction : public ChromeSyncExtensionFunction { EXTENSION_SETUPDATEURLDATA) protected: - virtual ~ExtensionSetUpdateUrlDataFunction() {} + ~ExtensionSetUpdateUrlDataFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ExtensionIsAllowedIncognitoAccessFunction @@ -35,10 +35,10 @@ class ExtensionIsAllowedIncognitoAccessFunction EXTENSION_ISALLOWEDINCOGNITOACCESS) protected: - virtual ~ExtensionIsAllowedIncognitoAccessFunction() {} + ~ExtensionIsAllowedIncognitoAccessFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ExtensionIsAllowedFileSchemeAccessFunction @@ -48,10 +48,10 @@ class ExtensionIsAllowedFileSchemeAccessFunction EXTENSION_ISALLOWEDFILESCHEMEACCESS) protected: - virtual ~ExtensionIsAllowedFileSchemeAccessFunction() {} + ~ExtensionIsAllowedFileSchemeAccessFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/music_manager_private/music_manager_private_api.h b/chrome/browser/extensions/api/music_manager_private/music_manager_private_api.h index d1e9d99..88af6a8 100644 --- a/chrome/browser/extensions/api/music_manager_private/music_manager_private_api.h +++ b/chrome/browser/extensions/api/music_manager_private/music_manager_private_api.h @@ -18,10 +18,10 @@ class MusicManagerPrivateGetDeviceIdFunction : public AsyncExtensionFunction { MusicManagerPrivateGetDeviceIdFunction(); protected: - virtual ~MusicManagerPrivateGetDeviceIdFunction(); + ~MusicManagerPrivateGetDeviceIdFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; void DeviceIdCallback(const std::string& device_id); }; diff --git a/chrome/browser/extensions/api/networking_private/crypto_verify_impl.h b/chrome/browser/extensions/api/networking_private/crypto_verify_impl.h index 1f3d8d6..3e687e6 100644 --- a/chrome/browser/extensions/api/networking_private/crypto_verify_impl.h +++ b/chrome/browser/extensions/api/networking_private/crypto_verify_impl.h @@ -15,20 +15,20 @@ class CryptoVerifyImpl : public extensions::NetworkingPrivateServiceClient::CryptoVerify { public: CryptoVerifyImpl(); - virtual ~CryptoVerifyImpl(); + ~CryptoVerifyImpl() override; // NetworkingPrivateServiceClient::CryptoVerify - virtual void VerifyDestination(const Credentials& credentials, - bool* verified, - std::string* error) override; - virtual void VerifyAndEncryptCredentials( + void VerifyDestination(const Credentials& credentials, + bool* verified, + std::string* error) override; + void VerifyAndEncryptCredentials( const std::string& network_guid, const Credentials& credentials, const VerifyAndEncryptCredentialsCallback& callback) override; - virtual void VerifyAndEncryptData(const Credentials& credentials, - const std::string& data, - std::string* base64_encoded_ciphertext, - std::string* error) override; + void VerifyAndEncryptData(const Credentials& credentials, + const std::string& data, + std::string* base64_encoded_ciphertext, + std::string* error) override; private: DISALLOW_COPY_AND_ASSIGN(CryptoVerifyImpl); diff --git a/chrome/browser/extensions/api/networking_private/networking_private_api.h b/chrome/browser/extensions/api/networking_private/networking_private_api.h index b82eb92..a78c767 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_api.h +++ b/chrome/browser/extensions/api/networking_private/networking_private_api.h @@ -32,10 +32,10 @@ class NetworkingPrivateGetPropertiesFunction : public AsyncExtensionFunction { NETWORKINGPRIVATE_GETPROPERTIES); protected: - virtual ~NetworkingPrivateGetPropertiesFunction(); + ~NetworkingPrivateGetPropertiesFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void Success(scoped_ptr<base::DictionaryValue> result); @@ -53,10 +53,10 @@ class NetworkingPrivateGetManagedPropertiesFunction NETWORKINGPRIVATE_GETMANAGEDPROPERTIES); protected: - virtual ~NetworkingPrivateGetManagedPropertiesFunction(); + ~NetworkingPrivateGetManagedPropertiesFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void Success(scoped_ptr<base::DictionaryValue> result); @@ -73,10 +73,10 @@ class NetworkingPrivateGetStateFunction : public AsyncExtensionFunction { NETWORKINGPRIVATE_GETSTATE); protected: - virtual ~NetworkingPrivateGetStateFunction(); + ~NetworkingPrivateGetStateFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void Success(scoped_ptr<base::DictionaryValue> result); @@ -93,10 +93,10 @@ class NetworkingPrivateSetPropertiesFunction : public AsyncExtensionFunction { NETWORKINGPRIVATE_SETPROPERTIES); protected: - virtual ~NetworkingPrivateSetPropertiesFunction(); + ~NetworkingPrivateSetPropertiesFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void Success(); @@ -113,10 +113,10 @@ class NetworkingPrivateCreateNetworkFunction : public AsyncExtensionFunction { NETWORKINGPRIVATE_CREATENETWORK); protected: - virtual ~NetworkingPrivateCreateNetworkFunction(); + ~NetworkingPrivateCreateNetworkFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void Success(const std::string& guid); @@ -133,10 +133,10 @@ class NetworkingPrivateGetNetworksFunction : public AsyncExtensionFunction { NETWORKINGPRIVATE_GETNETWORKS); protected: - virtual ~NetworkingPrivateGetNetworksFunction(); + ~NetworkingPrivateGetNetworksFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void Success(scoped_ptr<base::ListValue> network_list); @@ -154,10 +154,10 @@ class NetworkingPrivateGetVisibleNetworksFunction NETWORKINGPRIVATE_GETVISIBLENETWORKS); protected: - virtual ~NetworkingPrivateGetVisibleNetworksFunction(); + ~NetworkingPrivateGetVisibleNetworksFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void Success(scoped_ptr<base::ListValue> network_list); @@ -175,10 +175,10 @@ class NetworkingPrivateGetEnabledNetworkTypesFunction NETWORKINGPRIVATE_GETENABLEDNETWORKTYPES); protected: - virtual ~NetworkingPrivateGetEnabledNetworkTypesFunction(); + ~NetworkingPrivateGetEnabledNetworkTypesFunction() override; // SyncExtensionFunction overrides. - virtual bool RunSync() override; + bool RunSync() override; private: DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateGetEnabledNetworkTypesFunction); @@ -193,10 +193,10 @@ class NetworkingPrivateEnableNetworkTypeFunction NETWORKINGPRIVATE_ENABLENETWORKTYPE); protected: - virtual ~NetworkingPrivateEnableNetworkTypeFunction(); + ~NetworkingPrivateEnableNetworkTypeFunction() override; // SyncExtensionFunction overrides. - virtual bool RunSync() override; + bool RunSync() override; private: DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateEnableNetworkTypeFunction); @@ -211,10 +211,10 @@ class NetworkingPrivateDisableNetworkTypeFunction NETWORKINGPRIVATE_DISABLENETWORKTYPE); protected: - virtual ~NetworkingPrivateDisableNetworkTypeFunction(); + ~NetworkingPrivateDisableNetworkTypeFunction() override; // SyncExtensionFunction overrides. - virtual bool RunSync() override; + bool RunSync() override; private: DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateDisableNetworkTypeFunction); @@ -229,10 +229,10 @@ class NetworkingPrivateRequestNetworkScanFunction NETWORKINGPRIVATE_REQUESTNETWORKSCAN); protected: - virtual ~NetworkingPrivateRequestNetworkScanFunction(); + ~NetworkingPrivateRequestNetworkScanFunction() override; // SyncExtensionFunction overrides. - virtual bool RunSync() override; + bool RunSync() override; private: DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateRequestNetworkScanFunction); @@ -247,10 +247,10 @@ class NetworkingPrivateStartConnectFunction : public AsyncExtensionFunction { NETWORKINGPRIVATE_STARTCONNECT); protected: - virtual ~NetworkingPrivateStartConnectFunction(); + ~NetworkingPrivateStartConnectFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void Success(); @@ -267,10 +267,10 @@ class NetworkingPrivateStartDisconnectFunction : public AsyncExtensionFunction { NETWORKINGPRIVATE_STARTDISCONNECT); protected: - virtual ~NetworkingPrivateStartDisconnectFunction(); + ~NetworkingPrivateStartDisconnectFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; private: void Success(); @@ -288,10 +288,10 @@ class NetworkingPrivateVerifyDestinationFunction NETWORKINGPRIVATE_VERIFYDESTINATION); protected: - virtual ~NetworkingPrivateVerifyDestinationFunction(); + ~NetworkingPrivateVerifyDestinationFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; void Success(bool result); void Failure(const std::string& error); @@ -309,10 +309,10 @@ class NetworkingPrivateVerifyAndEncryptCredentialsFunction NETWORKINGPRIVATE_VERIFYANDENCRYPTCREDENTIALS); protected: - virtual ~NetworkingPrivateVerifyAndEncryptCredentialsFunction(); + ~NetworkingPrivateVerifyAndEncryptCredentialsFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; void Success(const std::string& result); void Failure(const std::string& error); @@ -331,10 +331,10 @@ class NetworkingPrivateVerifyAndEncryptDataFunction NETWORKINGPRIVATE_VERIFYANDENCRYPTDATA); protected: - virtual ~NetworkingPrivateVerifyAndEncryptDataFunction(); + ~NetworkingPrivateVerifyAndEncryptDataFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; void Success(const std::string& result); void Failure(const std::string& error); @@ -352,10 +352,10 @@ class NetworkingPrivateSetWifiTDLSEnabledStateFunction NETWORKINGPRIVATE_SETWIFITDLSENABLEDSTATE); protected: - virtual ~NetworkingPrivateSetWifiTDLSEnabledStateFunction(); + ~NetworkingPrivateSetWifiTDLSEnabledStateFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; void Success(const std::string& result); void Failure(const std::string& error); @@ -373,10 +373,10 @@ class NetworkingPrivateGetWifiTDLSStatusFunction NETWORKINGPRIVATE_GETWIFITDLSSTATUS); protected: - virtual ~NetworkingPrivateGetWifiTDLSStatusFunction(); + ~NetworkingPrivateGetWifiTDLSStatusFunction() override; // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; void Success(const std::string& result); void Failure(const std::string& error); @@ -393,10 +393,10 @@ class NetworkingPrivateGetCaptivePortalStatusFunction NETWORKINGPRIVATE_GETCAPTIVEPORTALSTATUS); // AsyncExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; protected: - virtual ~NetworkingPrivateGetCaptivePortalStatusFunction(); + ~NetworkingPrivateGetCaptivePortalStatusFunction() override; private: void Success(const std::string& result); diff --git a/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc b/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc index 0749845..8de32a5 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc @@ -38,46 +38,44 @@ class TestDelegate : public KeyedService, } // Asynchronous methods - virtual void GetProperties(const std::string& guid, - const DictionaryCallback& success_callback, - const FailureCallback& failure_callback) override { + void GetProperties(const std::string& guid, + const DictionaryCallback& success_callback, + const FailureCallback& failure_callback) override { DictionaryResult(guid, success_callback, failure_callback); } - virtual void GetManagedProperties( - const std::string& guid, - const DictionaryCallback& success_callback, - const FailureCallback& failure_callback) override { + void GetManagedProperties(const std::string& guid, + const DictionaryCallback& success_callback, + const FailureCallback& failure_callback) override { DictionaryResult(guid, success_callback, failure_callback); } - virtual void GetState(const std::string& guid, - const DictionaryCallback& success_callback, - const FailureCallback& failure_callback) override { + void GetState(const std::string& guid, + const DictionaryCallback& success_callback, + const FailureCallback& failure_callback) override { DictionaryResult(guid, success_callback, failure_callback); } - - virtual void SetProperties(const std::string& guid, - scoped_ptr<base::DictionaryValue> properties, - const VoidCallback& success_callback, - const FailureCallback& failure_callback) override { + void SetProperties(const std::string& guid, + scoped_ptr<base::DictionaryValue> properties, + const VoidCallback& success_callback, + const FailureCallback& failure_callback) override { VoidResult(success_callback, failure_callback); } - virtual void CreateNetwork(bool shared, - scoped_ptr<base::DictionaryValue> properties, - const StringCallback& success_callback, - const FailureCallback& failure_callback) override { + void CreateNetwork(bool shared, + scoped_ptr<base::DictionaryValue> properties, + const StringCallback& success_callback, + const FailureCallback& failure_callback) override { StringResult(success_callback, failure_callback); } - virtual void GetNetworks(const std::string& network_type, - bool configured_only, - bool visible_only, - int limit, - const NetworkListCallback& success_callback, - const FailureCallback& failure_callback) override { + void GetNetworks(const std::string& network_type, + bool configured_only, + bool visible_only, + int limit, + const NetworkListCallback& success_callback, + const FailureCallback& failure_callback) override { if (fail_) { failure_callback.Run(kFailure); } else { @@ -91,27 +89,25 @@ class TestDelegate : public KeyedService, } } - virtual void StartConnect(const std::string& guid, - const VoidCallback& success_callback, - const FailureCallback& failure_callback) override { + void StartConnect(const std::string& guid, + const VoidCallback& success_callback, + const FailureCallback& failure_callback) override { VoidResult(success_callback, failure_callback); } - virtual void StartDisconnect( - const std::string& guid, - const VoidCallback& success_callback, - const FailureCallback& failure_callback) override { + void StartDisconnect(const std::string& guid, + const VoidCallback& success_callback, + const FailureCallback& failure_callback) override { VoidResult(success_callback, failure_callback); } - virtual void VerifyDestination( - const VerificationProperties& verification_properties, - const BoolCallback& success_callback, - const FailureCallback& failure_callback) override { + void VerifyDestination(const VerificationProperties& verification_properties, + const BoolCallback& success_callback, + const FailureCallback& failure_callback) override { BoolResult(success_callback, failure_callback); } - virtual void VerifyAndEncryptCredentials( + void VerifyAndEncryptCredentials( const std::string& guid, const VerificationProperties& verification_properties, const StringCallback& success_callback, @@ -119,7 +115,7 @@ class TestDelegate : public KeyedService, StringResult(success_callback, failure_callback); } - virtual void VerifyAndEncryptData( + void VerifyAndEncryptData( const VerificationProperties& verification_properties, const std::string& data, const StringCallback& success_callback, @@ -127,7 +123,7 @@ class TestDelegate : public KeyedService, StringResult(success_callback, failure_callback); } - virtual void SetWifiTDLSEnabledState( + void SetWifiTDLSEnabledState( const std::string& ip_or_mac_address, bool enabled, const StringCallback& success_callback, @@ -135,14 +131,13 @@ class TestDelegate : public KeyedService, StringResult(success_callback, failure_callback); } - virtual void GetWifiTDLSStatus( - const std::string& ip_or_mac_address, - const StringCallback& success_callback, - const FailureCallback& failure_callback) override { + void GetWifiTDLSStatus(const std::string& ip_or_mac_address, + const StringCallback& success_callback, + const FailureCallback& failure_callback) override { StringResult(success_callback, failure_callback); } - virtual void GetCaptivePortalStatus( + void GetCaptivePortalStatus( const std::string& guid, const StringCallback& success_callback, const FailureCallback& failure_callback) override { @@ -150,7 +145,7 @@ class TestDelegate : public KeyedService, } // Synchronous methods - virtual scoped_ptr<base::ListValue> GetEnabledNetworkTypes() override { + scoped_ptr<base::ListValue> GetEnabledNetworkTypes() override { scoped_ptr<base::ListValue> result; if (!fail_) { result.reset(new base::ListValue); @@ -159,17 +154,17 @@ class TestDelegate : public KeyedService, return result.Pass(); } - virtual bool EnableNetworkType(const std::string& type) override{ + bool EnableNetworkType(const std::string& type) override { enabled_[type] = true; return !fail_; } - virtual bool DisableNetworkType(const std::string& type) override { + bool DisableNetworkType(const std::string& type) override { disabled_[type] = true; return !fail_; } - virtual bool RequestScan() override { + bool RequestScan() override { scan_requested_.push_back(true); return !fail_; } @@ -240,7 +235,7 @@ class NetworkingPrivateApiTest : public ExtensionApiTest { return s_test_delegate_; } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); // Whitelist the extension ID of the test extension. command_line->AppendSwitchASCII( @@ -248,7 +243,7 @@ class NetworkingPrivateApiTest : public ExtensionApiTest { "epcifkihnkjgphfkloaaleeakhpmgdmn"); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); #if defined(OS_CHROMEOS) NetworkingPrivateChromeOSFactory::GetInstance()->SetTestingFactory( diff --git a/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_mac.cc b/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_mac.cc index 9d5643f..8d9c850 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_mac.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_mac.cc @@ -22,14 +22,13 @@ class NetworkingPrivateCredentialsGetterMac public: explicit NetworkingPrivateCredentialsGetterMac(); - virtual void Start( - const std::string& network_guid, - const std::string& public_key, - const extensions::NetworkingPrivateServiceClient::CryptoVerify:: - VerifyAndEncryptCredentialsCallback& callback) override; + void Start(const std::string& network_guid, + const std::string& public_key, + const extensions::NetworkingPrivateServiceClient::CryptoVerify:: + VerifyAndEncryptCredentialsCallback& callback) override; private: - virtual ~NetworkingPrivateCredentialsGetterMac(); + ~NetworkingPrivateCredentialsGetterMac() override; DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCredentialsGetterMac); }; diff --git a/chrome/browser/extensions/api/networking_private/networking_private_event_router_factory.h b/chrome/browser/extensions/api/networking_private/networking_private_event_router_factory.h index 463b9df..801fd69 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_event_router_factory.h +++ b/chrome/browser/extensions/api/networking_private/networking_private_event_router_factory.h @@ -28,19 +28,19 @@ class NetworkingPrivateEventRouterFactory protected: // BrowserContextKeyedBaseFactory overrides: - virtual content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* GetBrowserContextToUse( content::BrowserContext* context) const override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsNULLWhileTesting() const override; private: friend struct DefaultSingletonTraits<NetworkingPrivateEventRouterFactory>; NetworkingPrivateEventRouterFactory(); - virtual ~NetworkingPrivateEventRouterFactory(); + ~NetworkingPrivateEventRouterFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateEventRouterFactory); diff --git a/chrome/browser/extensions/api/networking_private/networking_private_event_router_nonchromeos.cc b/chrome/browser/extensions/api/networking_private/networking_private_event_router_nonchromeos.cc index 11cdd70..b774546 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_event_router_nonchromeos.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_event_router_nonchromeos.cc @@ -20,20 +20,20 @@ class NetworkingPrivateEventRouterImpl NetworkingPrivateServiceClient::Observer { public: explicit NetworkingPrivateEventRouterImpl(Profile* profile); - virtual ~NetworkingPrivateEventRouterImpl(); + ~NetworkingPrivateEventRouterImpl() override; protected: // KeyedService overrides: - virtual void Shutdown() override; + void Shutdown() override; // EventRouter::Observer overrides: - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; // NetworkingPrivateServiceClient::Observer overrides: - virtual void OnNetworksChangedEvent( + void OnNetworksChangedEvent( const std::vector<std::string>& network_guids) override; - virtual void OnNetworkListChangedEvent( + void OnNetworkListChangedEvent( const std::vector<std::string>& network_guids) override; private: diff --git a/chrome/browser/extensions/api/networking_private/networking_private_service_client.h b/chrome/browser/extensions/api/networking_private/networking_private_service_client.h index f266c65..4253b14 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_service_client.h +++ b/chrome/browser/extensions/api/networking_private/networking_private_service_client.h @@ -112,71 +112,66 @@ class NetworkingPrivateServiceClient CryptoVerify* crypto_verify); // KeyedService - virtual void Shutdown() override; + void Shutdown() override; // NetworkingPrivateDelegate - virtual void GetProperties(const std::string& guid, - const DictionaryCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual void GetManagedProperties( - const std::string& guid, - const DictionaryCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual void GetState(const std::string& guid, - const DictionaryCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual void SetProperties(const std::string& guid, - scoped_ptr<base::DictionaryValue> properties_dict, - const VoidCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual void CreateNetwork(bool shared, - scoped_ptr<base::DictionaryValue> properties_dict, - const StringCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual void GetNetworks(const std::string& network_type, - bool configured_only, - bool visible_only, - int limit, - const NetworkListCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual void StartConnect(const std::string& guid, - const VoidCallback& success_callback, + void GetProperties(const std::string& guid, + const DictionaryCallback& success_callback, + const FailureCallback& failure_callback) override; + void GetManagedProperties(const std::string& guid, + const DictionaryCallback& success_callback, const FailureCallback& failure_callback) override; - virtual void StartDisconnect( - const std::string& guid, - const VoidCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual void VerifyDestination( - const VerificationProperties& verification_properties, - const BoolCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual void VerifyAndEncryptCredentials( + void GetState(const std::string& guid, + const DictionaryCallback& success_callback, + const FailureCallback& failure_callback) override; + void SetProperties(const std::string& guid, + scoped_ptr<base::DictionaryValue> properties_dict, + const VoidCallback& success_callback, + const FailureCallback& failure_callback) override; + void CreateNetwork(bool shared, + scoped_ptr<base::DictionaryValue> properties_dict, + const StringCallback& success_callback, + const FailureCallback& failure_callback) override; + void GetNetworks(const std::string& network_type, + bool configured_only, + bool visible_only, + int limit, + const NetworkListCallback& success_callback, + const FailureCallback& failure_callback) override; + void StartConnect(const std::string& guid, + const VoidCallback& success_callback, + const FailureCallback& failure_callback) override; + void StartDisconnect(const std::string& guid, + const VoidCallback& success_callback, + const FailureCallback& failure_callback) override; + void VerifyDestination(const VerificationProperties& verification_properties, + const BoolCallback& success_callback, + const FailureCallback& failure_callback) override; + void VerifyAndEncryptCredentials( const std::string& guid, const VerificationProperties& verification_properties, const StringCallback& success_callback, const FailureCallback& failure_callback) override; - virtual void VerifyAndEncryptData( + void VerifyAndEncryptData( const VerificationProperties& verification_properties, const std::string& data, const StringCallback& success_callback, const FailureCallback& failure_callback) override; - virtual void SetWifiTDLSEnabledState( + void SetWifiTDLSEnabledState( const std::string& ip_or_mac_address, bool enabled, const StringCallback& success_callback, const FailureCallback& failure_callback) override; - virtual void GetWifiTDLSStatus( - const std::string& ip_or_mac_address, - const StringCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual void GetCaptivePortalStatus( - const std::string& guid, - const StringCallback& success_callback, - const FailureCallback& failure_callback) override; - virtual scoped_ptr<base::ListValue> GetEnabledNetworkTypes() override; - virtual bool EnableNetworkType(const std::string& type) override; - virtual bool DisableNetworkType(const std::string& type) override; - virtual bool RequestScan() override; + void GetWifiTDLSStatus(const std::string& ip_or_mac_address, + const StringCallback& success_callback, + const FailureCallback& failure_callback) override; + void GetCaptivePortalStatus(const std::string& guid, + const StringCallback& success_callback, + const FailureCallback& failure_callback) override; + scoped_ptr<base::ListValue> GetEnabledNetworkTypes() override; + bool EnableNetworkType(const std::string& type) override; + bool DisableNetworkType(const std::string& type) override; + bool RequestScan() override; // Adds observer to network events. void AddObserver(Observer* network_events_observer); @@ -186,7 +181,7 @@ class NetworkingPrivateServiceClient void RemoveObserver(Observer* network_events_observer); // NetworkChangeNotifier::NetworkChangeObserver implementation. - virtual void OnNetworkChanged( + void OnNetworkChanged( net::NetworkChangeNotifier::ConnectionType type) override; private: @@ -214,7 +209,7 @@ class NetworkingPrivateServiceClient }; typedef IDMap<ServiceCallbacks, IDMapOwnPointer> ServiceCallbacksMap; - virtual ~NetworkingPrivateServiceClient(); + ~NetworkingPrivateServiceClient() override; // Callback wrappers. void AfterGetProperties(ServiceCallbacksID callback_id, diff --git a/chrome/browser/extensions/api/networking_private/networking_private_service_client_apitest.cc b/chrome/browser/extensions/api/networking_private/networking_private_service_client_apitest.cc index 7310d49..6077343 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_service_client_apitest.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_service_client_apitest.cc @@ -36,23 +36,23 @@ namespace { // networking_private_apitest. class CryptoVerifyStub : public extensions::NetworkingPrivateServiceClient::CryptoVerify { - virtual void VerifyDestination(const Credentials& verification_properties, - bool* verified, - std::string* error) override { + void VerifyDestination(const Credentials& verification_properties, + bool* verified, + std::string* error) override { *verified = true; } - virtual void VerifyAndEncryptCredentials( + void VerifyAndEncryptCredentials( const std::string& network_guid, const Credentials& credentials, const VerifyAndEncryptCredentialsCallback& callback) override { callback.Run("encrypted_credentials", ""); } - virtual void VerifyAndEncryptData(const Credentials& verification_properties, - const std::string& data, - std::string* base64_encoded_ciphertext, - std::string* error) override { + void VerifyAndEncryptData(const Credentials& verification_properties, + const std::string& data, + std::string* base64_encoded_ciphertext, + std::string* error) override { *base64_encoded_ciphertext = "encrypted_data"; } }; @@ -67,11 +67,11 @@ class NetworkingPrivateServiceClientApiTest : public ExtensionApiTest { kFlagEnableFileAccess | kFlagLoadAsComponent); } - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); // Whitelist the extension ID of the test extension. command_line->AppendSwitchASCII( @@ -85,7 +85,7 @@ class NetworkingPrivateServiceClientApiTest : public ExtensionApiTest { new CryptoVerifyStub()); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); content::RunAllPendingInMessageLoop(); NetworkingPrivateServiceClientFactory::GetInstance()->SetTestingFactory( diff --git a/chrome/browser/extensions/api/networking_private/networking_private_service_client_factory.h b/chrome/browser/extensions/api/networking_private/networking_private_service_client_factory.h index 2a7cb93..7ae4ad8 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_service_client_factory.h +++ b/chrome/browser/extensions/api/networking_private/networking_private_service_client_factory.h @@ -28,13 +28,13 @@ class NetworkingPrivateServiceClientFactory friend struct DefaultSingletonTraits<NetworkingPrivateServiceClientFactory>; NetworkingPrivateServiceClientFactory(); - virtual ~NetworkingPrivateServiceClientFactory(); + ~NetworkingPrivateServiceClientFactory() override; // BrowserContextKeyedServiceFactory: - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* browser_context) const override; - virtual bool ServiceIsCreatedWithBrowserContext() const override; - virtual bool ServiceIsNULLWhileTesting() const override; + bool ServiceIsCreatedWithBrowserContext() const override; + bool ServiceIsNULLWhileTesting() const override; DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateServiceClientFactory); }; diff --git a/chrome/browser/extensions/api/notification_provider/notification_provider_api.h b/chrome/browser/extensions/api/notification_provider/notification_provider_api.h index 46c6537..012e068 100644 --- a/chrome/browser/extensions/api/notification_provider/notification_provider_api.h +++ b/chrome/browser/extensions/api/notification_provider/notification_provider_api.h @@ -63,14 +63,14 @@ class NotificationProviderNotifyOnClearedFunction NotificationProviderNotifyOnClearedFunction(); protected: - virtual ~NotificationProviderNotifyOnClearedFunction(); + ~NotificationProviderNotifyOnClearedFunction() override; private: DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnCleared", NOTIFICATIONPROVIDER_NOTIFYONCLEARED); // UIThreadExtensionFunction implementation. - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; // Implememtation of NotifyOnClicked function of the API. It will inform the @@ -82,14 +82,14 @@ class NotificationProviderNotifyOnClickedFunction NotificationProviderNotifyOnClickedFunction(); protected: - virtual ~NotificationProviderNotifyOnClickedFunction(); + ~NotificationProviderNotifyOnClickedFunction() override; private: DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnClicked", NOTIFICATIONPROVIDER_NOTIFYONCLICKED); // UIThreadExtensionFunction implementation. - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; // Implememtation of NotifyOnButtonClicked function of the API. It will inform @@ -102,14 +102,14 @@ class NotificationProviderNotifyOnButtonClickedFunction NotificationProviderNotifyOnButtonClickedFunction(); protected: - virtual ~NotificationProviderNotifyOnButtonClickedFunction(); + ~NotificationProviderNotifyOnButtonClickedFunction() override; private: DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnButtonClicked", NOTIFICATIONPROVIDER_NOTIFYONBUTTONCLICKED); // UIThreadExtensionFunction implementation. - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; // Implememtation of NotifyOnPermissionLevelChanged function of the API. It will @@ -121,7 +121,7 @@ class NotificationProviderNotifyOnPermissionLevelChangedFunction NotificationProviderNotifyOnPermissionLevelChangedFunction(); protected: - virtual ~NotificationProviderNotifyOnPermissionLevelChangedFunction(); + ~NotificationProviderNotifyOnPermissionLevelChangedFunction() override; private: DECLARE_EXTENSION_FUNCTION( @@ -129,7 +129,7 @@ class NotificationProviderNotifyOnPermissionLevelChangedFunction NOTIFICATIONPROVIDER_NOTIFYONPERMISSIONLEVELCHANGED); // UIThreadExtensionFunction implementation. - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; // Implememtation of NotifyOnShowSettings function of the API. It will inform @@ -140,14 +140,14 @@ class NotificationProviderNotifyOnShowSettingsFunction NotificationProviderNotifyOnShowSettingsFunction(); protected: - virtual ~NotificationProviderNotifyOnShowSettingsFunction(); + ~NotificationProviderNotifyOnShowSettingsFunction() override; private: DECLARE_EXTENSION_FUNCTION("notificationProvider.notifyOnShowSettings", NOTIFICATIONPROVIDER_NOTIFYONSHOWSETTINGS); // UIThreadExtensionFunction implementation. - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; // Implememtation of GetNotifier function of the API. It will get the notifier @@ -158,14 +158,14 @@ class NotificationProviderGetNotifierFunction NotificationProviderGetNotifierFunction(); protected: - virtual ~NotificationProviderGetNotifierFunction(); + ~NotificationProviderGetNotifierFunction() override; private: DECLARE_EXTENSION_FUNCTION("notificationProvider.getNotifier", NOTIFICATIONPROVIDER_GETNOTIFIER); // UIThreadExtensionFunction implementation. - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; // Implememtation of GetAllNotifiers function of the API. It will get all the @@ -176,14 +176,14 @@ class NotificationProviderGetAllNotifiersFunction NotificationProviderGetAllNotifiersFunction(); protected: - virtual ~NotificationProviderGetAllNotifiersFunction(); + ~NotificationProviderGetAllNotifiersFunction() override; private: DECLARE_EXTENSION_FUNCTION("notificationProvider.getAllNotifiers", NOTIFICATIONPROVIDER_GETALLNOTIFIERS); // UIThreadExtensionFunction implementation. - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc index 1a2391d..5350ba4 100644 --- a/chrome/browser/extensions/api/notifications/notifications_api.cc +++ b/chrome/browser/extensions/api/notifications/notifications_api.cc @@ -85,11 +85,11 @@ class NotificationsApiDelegate : public NotificationDelegate { DCHECK(api_function_.get()); } - virtual void Display() override { } + void Display() override {} - virtual void Error() override {} + void Error() override {} - virtual void Close(bool by_user) override { + void Close(bool by_user) override { EventRouter::UserGestureState gesture = by_user ? EventRouter::USER_GESTURE_ENABLED : EventRouter::USER_GESTURE_NOT_ENABLED; @@ -98,19 +98,19 @@ class NotificationsApiDelegate : public NotificationDelegate { SendEvent(notifications::OnClosed::kEventName, gesture, args.Pass()); } - virtual void Click() override { + void Click() override { scoped_ptr<base::ListValue> args(CreateBaseEventArgs()); SendEvent(notifications::OnClicked::kEventName, EventRouter::USER_GESTURE_ENABLED, args.Pass()); } - virtual bool HasClickedListener() override { + bool HasClickedListener() override { return EventRouter::Get(profile_)->HasEventListener( notifications::OnClicked::kEventName); } - virtual void ButtonClick(int index) override { + void ButtonClick(int index) override { scoped_ptr<base::ListValue> args(CreateBaseEventArgs()); args->Append(new base::FundamentalValue(index)); SendEvent(notifications::OnButtonClicked::kEventName, @@ -118,12 +118,10 @@ class NotificationsApiDelegate : public NotificationDelegate { args.Pass()); } - virtual std::string id() const override { - return scoped_id_; - } + std::string id() const override { return scoped_id_; } private: - virtual ~NotificationsApiDelegate() {} + ~NotificationsApiDelegate() override {} void SendEvent(const std::string& name, EventRouter::UserGestureState user_gesture, diff --git a/chrome/browser/extensions/api/notifications/notifications_api.h b/chrome/browser/extensions/api/notifications/notifications_api.h index 2f130b5d..b3ef00b 100644 --- a/chrome/browser/extensions/api/notifications/notifications_api.h +++ b/chrome/browser/extensions/api/notifications/notifications_api.h @@ -25,7 +25,7 @@ class NotificationsApiFunction : public ChromeAsyncExtensionFunction { protected: NotificationsApiFunction(); - virtual ~NotificationsApiFunction(); + ~NotificationsApiFunction() override; bool CreateNotification(const std::string& id, api::notifications::NotificationOptions* options); @@ -45,7 +45,7 @@ class NotificationsApiFunction : public ChromeAsyncExtensionFunction { virtual bool RunNotificationsApi() = 0; // UITHreadExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; message_center::NotificationType MapApiTemplateTypeToType( api::notifications::TemplateType type); @@ -56,10 +56,10 @@ class NotificationsCreateFunction : public NotificationsApiFunction { NotificationsCreateFunction(); // NotificationsApiFunction: - virtual bool RunNotificationsApi() override; + bool RunNotificationsApi() override; protected: - virtual ~NotificationsCreateFunction(); + ~NotificationsCreateFunction() override; private: scoped_ptr<api::notifications::Create::Params> params_; @@ -72,10 +72,10 @@ class NotificationsUpdateFunction : public NotificationsApiFunction { NotificationsUpdateFunction(); // NotificationsApiFunction: - virtual bool RunNotificationsApi() override; + bool RunNotificationsApi() override; protected: - virtual ~NotificationsUpdateFunction(); + ~NotificationsUpdateFunction() override; private: scoped_ptr<api::notifications::Update::Params> params_; @@ -88,10 +88,10 @@ class NotificationsClearFunction : public NotificationsApiFunction { NotificationsClearFunction(); // NotificationsApiFunction: - virtual bool RunNotificationsApi() override; + bool RunNotificationsApi() override; protected: - virtual ~NotificationsClearFunction(); + ~NotificationsClearFunction() override; private: scoped_ptr<api::notifications::Clear::Params> params_; @@ -104,10 +104,10 @@ class NotificationsGetAllFunction : public NotificationsApiFunction { NotificationsGetAllFunction(); // NotificationsApiFunction: - virtual bool RunNotificationsApi() override; + bool RunNotificationsApi() override; protected: - virtual ~NotificationsGetAllFunction(); + ~NotificationsGetAllFunction() override; private: DECLARE_EXTENSION_FUNCTION("notifications.getAll", NOTIFICATIONS_GET_ALL) @@ -119,11 +119,11 @@ class NotificationsGetPermissionLevelFunction NotificationsGetPermissionLevelFunction(); // NotificationsApiFunction: - virtual bool CanRunWhileDisabled() const override; - virtual bool RunNotificationsApi() override; + bool CanRunWhileDisabled() const override; + bool RunNotificationsApi() override; protected: - virtual ~NotificationsGetPermissionLevelFunction(); + ~NotificationsGetPermissionLevelFunction() override; private: DECLARE_EXTENSION_FUNCTION("notifications.getPermissionLevel", diff --git a/chrome/browser/extensions/api/notifications/notifications_apitest.cc b/chrome/browser/extensions/api/notifications/notifications_apitest.cc index 885f900..014f19d 100644 --- a/chrome/browser/extensions/api/notifications/notifications_apitest.cc +++ b/chrome/browser/extensions/api/notifications/notifications_apitest.cc @@ -40,7 +40,7 @@ class UserGestureCatcher : public content::NotificationObserver { content::NotificationService::AllSources()); } - virtual ~UserGestureCatcher() {} + ~UserGestureCatcher() override {} bool GetNextResult() { if (results_.empty()) { @@ -59,9 +59,9 @@ class UserGestureCatcher : public content::NotificationObserver { } private: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { results_.push_back( static_cast<content::Source<extensions::TestSendMessageFunction> >( source) diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.h b/chrome/browser/extensions/api/omnibox/omnibox_api.h index 036cd63..6db50e1f 100644 --- a/chrome/browser/extensions/api/omnibox/omnibox_api.h +++ b/chrome/browser/extensions/api/omnibox/omnibox_api.h @@ -77,17 +77,17 @@ class OmniboxSendSuggestionsFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("omnibox.sendSuggestions", OMNIBOX_SENDSUGGESTIONS) protected: - virtual ~OmniboxSendSuggestionsFunction() {} + ~OmniboxSendSuggestionsFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class OmniboxAPI : public BrowserContextKeyedAPI, public ExtensionRegistryObserver { public: explicit OmniboxAPI(content::BrowserContext* context); - virtual ~OmniboxAPI(); + ~OmniboxAPI() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<OmniboxAPI>* GetFactoryInstance(); @@ -96,7 +96,7 @@ class OmniboxAPI : public BrowserContextKeyedAPI, static OmniboxAPI* Get(content::BrowserContext* context); // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // Returns the icon to display in the omnibox for the given extension. gfx::Image GetOmniboxIcon(const std::string& extension_id); @@ -113,12 +113,11 @@ class OmniboxAPI : public BrowserContextKeyedAPI, void OnTemplateURLsLoaded(); // ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // BrowserContextKeyedAPI implementation. static const char* service_name() { @@ -156,10 +155,10 @@ class OmniboxSetDefaultSuggestionFunction : public ChromeSyncExtensionFunction { OMNIBOX_SETDEFAULTSUGGESTION) protected: - virtual ~OmniboxSetDefaultSuggestionFunction() {} + ~OmniboxSetDefaultSuggestionFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // If the extension has set a custom default suggestion via diff --git a/chrome/browser/extensions/api/page_capture/page_capture_api.h b/chrome/browser/extensions/api/page_capture/page_capture_api.h index 2a773a3..0c1aa1c 100644 --- a/chrome/browser/extensions/api/page_capture/page_capture_api.h +++ b/chrome/browser/extensions/api/page_capture/page_capture_api.h @@ -36,9 +36,9 @@ class PageCaptureSaveAsMHTMLFunction : public ChromeAsyncExtensionFunction { static void SetTestDelegate(TestDelegate* delegate); private: - virtual ~PageCaptureSaveAsMHTMLFunction(); - virtual bool RunAsync() override; - virtual bool OnMessageReceived(const IPC::Message& message) override; + ~PageCaptureSaveAsMHTMLFunction() override; + bool RunAsync() override; + bool OnMessageReceived(const IPC::Message& message) override; // Called on the file thread. void CreateTemporaryFile(); diff --git a/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc b/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc index 6805466..d5cdeb5 100644 --- a/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc +++ b/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc @@ -14,7 +14,7 @@ using extensions::PageCaptureSaveAsMHTMLFunction; class ExtensionPageCaptureApiTest : public ExtensionApiTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); } @@ -31,8 +31,7 @@ class PageCaptureSaveAsMHTMLDelegate PageCaptureSaveAsMHTMLFunction::SetTestDelegate(NULL); } - virtual void OnTemporaryFileCreated( - const base::FilePath& temp_file) override { + void OnTemporaryFileCreated(const base::FilePath& temp_file) override { temp_file_ = temp_file; } diff --git a/chrome/browser/extensions/api/permissions/permissions_api.h b/chrome/browser/extensions/api/permissions/permissions_api.h index d0eaa52..fa6431f 100644 --- a/chrome/browser/extensions/api/permissions/permissions_api.h +++ b/chrome/browser/extensions/api/permissions/permissions_api.h @@ -20,10 +20,10 @@ class PermissionsContainsFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("permissions.contains", PERMISSIONS_CONTAINS) protected: - virtual ~PermissionsContainsFunction() {} + ~PermissionsContainsFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // chrome.permissions.getAll @@ -32,10 +32,10 @@ class PermissionsGetAllFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("permissions.getAll", PERMISSIONS_GETALL) protected: - virtual ~PermissionsGetAllFunction() {} + ~PermissionsGetAllFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // chrome.permissions.remove @@ -44,10 +44,10 @@ class PermissionsRemoveFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("permissions.remove", PERMISSIONS_REMOVE) protected: - virtual ~PermissionsRemoveFunction() {} + ~PermissionsRemoveFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // chrome.permissions.request @@ -63,14 +63,14 @@ class PermissionsRequestFunction : public ChromeAsyncExtensionFunction, static void SetIgnoreUserGestureForTests(bool ignore); // ExtensionInstallPrompt::Delegate: - virtual void InstallUIProceed() override; - virtual void InstallUIAbort(bool user_initiated) override; + void InstallUIProceed() override; + void InstallUIAbort(bool user_initiated) override; protected: - virtual ~PermissionsRequestFunction(); + ~PermissionsRequestFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: scoped_ptr<ExtensionInstallPrompt> install_ui_; diff --git a/chrome/browser/extensions/api/permissions/permissions_apitest.cc b/chrome/browser/extensions/api/permissions/permissions_apitest.cc index cbb885e..798b2b5 100644 --- a/chrome/browser/extensions/api/permissions/permissions_apitest.cc +++ b/chrome/browser/extensions/api/permissions/permissions_apitest.cc @@ -24,7 +24,7 @@ static void AddPattern(URLPatternSet* extent, const std::string& pattern) { class ExperimentalApiTest : public ExtensionApiTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); } diff --git a/chrome/browser/extensions/api/preference/chrome_direct_setting.h b/chrome/browser/extensions/api/preference/chrome_direct_setting.h index aacbe1d..f1ae691 100644 --- a/chrome/browser/extensions/api/preference/chrome_direct_setting.h +++ b/chrome/browser/extensions/api/preference/chrome_direct_setting.h @@ -17,7 +17,7 @@ namespace chromedirectsetting { class DirectSettingFunctionBase : public ChromeSyncExtensionFunction { protected: DirectSettingFunctionBase(); - virtual ~DirectSettingFunctionBase(); + ~DirectSettingFunctionBase() override; // Returns the user pref service. PrefService* GetPrefService(); @@ -38,10 +38,10 @@ class GetDirectSettingFunction : public DirectSettingFunctionBase { protected: // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; private: - virtual ~GetDirectSettingFunction(); + ~GetDirectSettingFunction() override; DISALLOW_COPY_AND_ASSIGN(GetDirectSettingFunction); }; @@ -54,10 +54,10 @@ class SetDirectSettingFunction : public DirectSettingFunctionBase { protected: // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; private: - virtual ~SetDirectSettingFunction(); + ~SetDirectSettingFunction() override; DISALLOW_COPY_AND_ASSIGN(SetDirectSettingFunction); }; @@ -70,10 +70,10 @@ class ClearDirectSettingFunction : public DirectSettingFunctionBase { protected: // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; private: - virtual ~ClearDirectSettingFunction(); + ~ClearDirectSettingFunction() override; DISALLOW_COPY_AND_ASSIGN(ClearDirectSettingFunction); }; diff --git a/chrome/browser/extensions/api/preference/chrome_direct_setting_api.h b/chrome/browser/extensions/api/preference/chrome_direct_setting_api.h index d10c03b..5fe1486 100644 --- a/chrome/browser/extensions/api/preference/chrome_direct_setting_api.h +++ b/chrome/browser/extensions/api/preference/chrome_direct_setting_api.h @@ -23,17 +23,17 @@ class ChromeDirectSettingAPI : public BrowserContextKeyedAPI, public: explicit ChromeDirectSettingAPI(content::BrowserContext* context); - virtual ~ChromeDirectSettingAPI(); + ~ChromeDirectSettingAPI() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<ChromeDirectSettingAPI>* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; // Returns true if the preference is on the whitelist. bool IsPreferenceOnWhitelist(const std::string& pref_key); diff --git a/chrome/browser/extensions/api/preference/preference_api.cc b/chrome/browser/extensions/api/preference/preference_api.cc index c4cf8a6..b5e6716 100644 --- a/chrome/browser/extensions/api/preference/preference_api.cc +++ b/chrome/browser/extensions/api/preference/preference_api.cc @@ -124,13 +124,13 @@ PrefMappingEntry kPrefMapping[] = { class IdentityPrefTransformer : public PrefTransformerInterface { public: - virtual base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, - std::string* error, - bool* bad_message) override { + base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, + std::string* error, + bool* bad_message) override { return extension_pref->DeepCopy(); } - virtual base::Value* BrowserToExtensionPref( + base::Value* BrowserToExtensionPref( const base::Value* browser_pref) override { return browser_pref->DeepCopy(); } @@ -138,13 +138,13 @@ class IdentityPrefTransformer : public PrefTransformerInterface { class InvertBooleanTransformer : public PrefTransformerInterface { public: - virtual base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, - std::string* error, - bool* bad_message) override { + base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, + std::string* error, + bool* bad_message) override { return InvertBooleanValue(extension_pref); } - virtual base::Value* BrowserToExtensionPref( + base::Value* BrowserToExtensionPref( const base::Value* browser_pref) override { return InvertBooleanValue(browser_pref); } diff --git a/chrome/browser/extensions/api/preference/preference_api.h b/chrome/browser/extensions/api/preference/preference_api.h index 761febc..0f95a9b 100644 --- a/chrome/browser/extensions/api/preference/preference_api.h +++ b/chrome/browser/extensions/api/preference/preference_api.h @@ -96,10 +96,10 @@ class PreferenceAPI : public PreferenceAPIBase, public ContentSettingsStore::Observer { public: explicit PreferenceAPI(content::BrowserContext* context); - virtual ~PreferenceAPI(); + ~PreferenceAPI() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<PreferenceAPI>* GetFactoryInstance(); @@ -108,22 +108,22 @@ class PreferenceAPI : public PreferenceAPIBase, static PreferenceAPI* Get(content::BrowserContext* context); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<PreferenceAPI>; // ContentSettingsStore::Observer implementation. - virtual void OnContentSettingChanged(const std::string& extension_id, - bool incognito) override; + void OnContentSettingChanged(const std::string& extension_id, + bool incognito) override; // Clears incognito session-only content settings for all extensions. void ClearIncognitoSessionOnlyContentSettings(); // PreferenceAPIBase implementation. - virtual ExtensionPrefs* extension_prefs() override; - virtual ExtensionPrefValueMap* extension_pref_value_map() override; - virtual scoped_refptr<ContentSettingsStore> content_settings_store() override; + ExtensionPrefs* extension_prefs() override; + ExtensionPrefValueMap* extension_pref_value_map() override; + scoped_refptr<ContentSettingsStore> content_settings_store() override; Profile* profile_; @@ -169,7 +169,7 @@ class PreferenceFunction : public ChromeSyncExtensionFunction { protected: enum PermissionType { PERMISSION_TYPE_READ, PERMISSION_TYPE_WRITE }; - virtual ~PreferenceFunction(); + ~PreferenceFunction() override; // Given an |extension_pref_key|, provides its |browser_pref_key| from the // static map in preference_api.cc. Returns true if the corresponding @@ -186,10 +186,10 @@ class GetPreferenceFunction : public PreferenceFunction { DECLARE_EXTENSION_FUNCTION("types.ChromeSetting.get", TYPES_CHROMESETTING_GET) protected: - virtual ~GetPreferenceFunction(); + ~GetPreferenceFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class SetPreferenceFunction : public PreferenceFunction { @@ -197,10 +197,10 @@ class SetPreferenceFunction : public PreferenceFunction { DECLARE_EXTENSION_FUNCTION("types.ChromeSetting.set", TYPES_CHROMESETTING_SET) protected: - virtual ~SetPreferenceFunction(); + ~SetPreferenceFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ClearPreferenceFunction : public PreferenceFunction { @@ -209,10 +209,10 @@ class ClearPreferenceFunction : public PreferenceFunction { TYPES_CHROMESETTING_CLEAR) protected: - virtual ~ClearPreferenceFunction(); + ~ClearPreferenceFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc index 058fb8f..b29474b 100644 --- a/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc +++ b/chrome/browser/extensions/api/preference/preference_api_prefs_unittest.cc @@ -49,14 +49,13 @@ class TestPreferenceAPI : public PreferenceAPIBase { private: // PreferenceAPIBase implementation. - virtual ExtensionPrefs* extension_prefs() override { + ExtensionPrefs* extension_prefs() override { return test_extension_prefs_->prefs(); } - virtual ExtensionPrefValueMap* extension_pref_value_map() override { + ExtensionPrefValueMap* extension_pref_value_map() override { return test_extension_prefs_->extension_pref_value_map(); } - virtual scoped_refptr<ContentSettingsStore> content_settings_store() - override { + scoped_refptr<ContentSettingsStore> content_settings_store() override { return content_settings_->content_settings_store(); } @@ -71,8 +70,7 @@ class ExtensionControlledPrefsTest : public PrefsPrepopulatedTestBase { ExtensionControlledPrefsTest(); virtual ~ExtensionControlledPrefsTest(); - virtual void RegisterPreferences(user_prefs::PrefRegistrySyncable* registry) - override; + void RegisterPreferences(user_prefs::PrefRegistrySyncable* registry) override; void InstallExtensionControlledPref(Extension* extension, const std::string& key, base::Value* value); @@ -194,12 +192,12 @@ void ExtensionControlledPrefsTest::EnsureExtensionUninstalled( class ControlledPrefsInstallOneExtension : public ExtensionControlledPrefsTest { - virtual void Initialize() override { + void Initialize() override { InstallExtensionControlledPref(extension1(), kPref1, new base::StringValue("val1")); } - virtual void Verify() override { + void Verify() override { std::string actual = prefs()->pref_service()->GetString(kPref1); EXPECT_EQ("val1", actual); } @@ -211,7 +209,7 @@ TEST_F(ControlledPrefsInstallOneExtension, class ControlledPrefsInstallIncognitoPersistent : public ExtensionControlledPrefsTest { public: - virtual void Initialize() override { + void Initialize() override { InstallExtensionControlledPref( extension1(), kPref1, new base::StringValue("val1")); InstallExtensionControlledPrefIncognito( @@ -221,7 +219,7 @@ class ControlledPrefsInstallIncognitoPersistent EXPECT_EQ("val2", actual); } - virtual void Verify() override { + void Verify() override { // Main pref service shall see only non-incognito settings. std::string actual = prefs()->pref_service()->GetString(kPref1); EXPECT_EQ("val1", actual); @@ -240,7 +238,7 @@ class ControlledPrefsInstallIncognitoSessionOnly public: ControlledPrefsInstallIncognitoSessionOnly() : iteration_(0) {} - virtual void Initialize() override { + void Initialize() override { InstallExtensionControlledPref( extension1(), kPref1, new base::StringValue("val1")); InstallExtensionControlledPrefIncognitoSessionOnly( @@ -249,7 +247,7 @@ class ControlledPrefsInstallIncognitoSessionOnly std::string actual = incog_prefs->GetString(kPref1); EXPECT_EQ("val2", actual); } - virtual void Verify() override { + void Verify() override { // Main pref service shall see only non-incognito settings. std::string actual = prefs()->pref_service()->GetString(kPref1); EXPECT_EQ("val1", actual); @@ -271,7 +269,7 @@ TEST_F(ControlledPrefsInstallIncognitoSessionOnly, ControlledPrefsInstallIncognitoSessionOnly) { } class ControlledPrefsUninstallExtension : public ExtensionControlledPrefsTest { - virtual void Initialize() override { + void Initialize() override { InstallExtensionControlledPref( extension1(), kPref1, new base::StringValue("val1")); InstallExtensionControlledPref( @@ -288,7 +286,7 @@ class ControlledPrefsUninstallExtension : public ExtensionControlledPrefsTest { UninstallExtension(extension1()->id()); } - virtual void Verify() override { + void Verify() override { EXPECT_FALSE(prefs()->HasPrefForExtension(extension1()->id())); std::string actual; @@ -303,7 +301,7 @@ TEST_F(ControlledPrefsUninstallExtension, // Tests triggering of notifications to registered observers. class ControlledPrefsNotifyWhenNeeded : public ExtensionControlledPrefsTest { - virtual void Initialize() override { + void Initialize() override { using testing::_; using testing::Mock; using testing::StrEq; @@ -368,7 +366,7 @@ class ControlledPrefsNotifyWhenNeeded : public ExtensionControlledPrefsTest { registrar.Remove(kPref1); incognito_registrar.Remove(kPref1); } - virtual void Verify() override { + void Verify() override { std::string actual = prefs()->pref_service()->GetString(kPref1); EXPECT_EQ(kDefaultPref1, actual); } @@ -378,14 +376,14 @@ TEST_F(ControlledPrefsNotifyWhenNeeded, // Tests disabling an extension. class ControlledPrefsDisableExtension : public ExtensionControlledPrefsTest { - virtual void Initialize() override { + void Initialize() override { InstallExtensionControlledPref( extension1(), kPref1, new base::StringValue("val1")); std::string actual = prefs()->pref_service()->GetString(kPref1); EXPECT_EQ("val1", actual); prefs()->SetExtensionState(extension1()->id(), Extension::DISABLED); } - virtual void Verify() override { + void Verify() override { std::string actual = prefs()->pref_service()->GetString(kPref1); EXPECT_EQ(kDefaultPref1, actual); } @@ -394,13 +392,13 @@ TEST_F(ControlledPrefsDisableExtension, ControlledPrefsDisableExtension) { } // Tests disabling and reenabling an extension. class ControlledPrefsReenableExtension : public ExtensionControlledPrefsTest { - virtual void Initialize() override { + void Initialize() override { InstallExtensionControlledPref( extension1(), kPref1, new base::StringValue("val1")); prefs()->SetExtensionState(extension1()->id(), Extension::DISABLED); prefs()->SetExtensionState(extension1()->id(), Extension::ENABLED); } - virtual void Verify() override { + void Verify() override { std::string actual = prefs()->pref_service()->GetString(kPref1); EXPECT_EQ("val1", actual); } @@ -422,7 +420,7 @@ class MockStringValue : public base::StringValue { class ControlledPrefsSetExtensionControlledPref : public ExtensionControlledPrefsTest { public: - virtual void Initialize() override { + void Initialize() override { MockStringValue* v1 = new MockStringValue("https://www.chromium.org"); MockStringValue* v2 = new MockStringValue("https://www.chromium.org"); MockStringValue* v1i = new MockStringValue("https://www.chromium.org"); @@ -448,8 +446,7 @@ class ControlledPrefsSetExtensionControlledPref testing::Mock::VerifyAndClearExpectations(v2i); } - virtual void Verify() override { - } + void Verify() override {} }; TEST_F(ControlledPrefsSetExtensionControlledPref, ControlledPrefsSetExtensionControlledPref) { } @@ -461,13 +458,13 @@ class ControlledPrefsDisableExtensions : public ExtensionControlledPrefsTest { ControlledPrefsDisableExtensions() : iteration_(0) {} virtual ~ControlledPrefsDisableExtensions() {} - virtual void Initialize() override { + void Initialize() override { InstallExtensionControlledPref( extension1(), kPref1, new base::StringValue("val1")); // This becomes only active in the second verification phase. prefs_.set_extensions_disabled(true); } - virtual void Verify() override { + void Verify() override { std::string actual = prefs()->pref_service()->GetString(kPref1); if (iteration_ == 0) { EXPECT_EQ("val1", actual); diff --git a/chrome/browser/extensions/api/preference/preference_apitest.cc b/chrome/browser/extensions/api/preference/preference_apitest.cc index 4f58d93..aefb854 100644 --- a/chrome/browser/extensions/api/preference/preference_apitest.cc +++ b/chrome/browser/extensions/api/preference/preference_apitest.cc @@ -69,7 +69,7 @@ class ExtensionPreferenceApiTest : public ExtensionApiTest { EXPECT_FALSE(prefs->GetBoolean(prefs::kSearchSuggestEnabled)); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); // The browser might get closed later (and therefore be destroyed), so we @@ -82,7 +82,7 @@ class ExtensionPreferenceApiTest : public ExtensionApiTest { g_browser_process->AddRefModule(); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { // ReleaseBrowserProcessModule() needs to be called in a message loop, so we // post a task to do it, then run the message loop. base::MessageLoop::current()->PostTask( diff --git a/chrome/browser/extensions/api/preferences_private/preferences_private_api.h b/chrome/browser/extensions/api/preferences_private/preferences_private_api.h index 1189f45..f1f2ffa 100644 --- a/chrome/browser/extensions/api/preferences_private/preferences_private_api.h +++ b/chrome/browser/extensions/api/preferences_private/preferences_private_api.h @@ -22,14 +22,14 @@ class PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction(); protected: - virtual ~PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction(); + ~PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction() override; private: // ProfileSyncServiceObserver: - virtual void OnStateChanged() override; + void OnStateChanged() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; DISALLOW_COPY_AND_ASSIGN( PreferencesPrivateGetSyncCategoriesWithoutPassphraseFunction); diff --git a/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc b/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc index f7d7382..95908d8 100644 --- a/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc +++ b/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc @@ -52,7 +52,7 @@ class FakeProfileSyncService : public ProfileSyncService { sync_initialized_(true), initialized_state_violation_(false) {} - virtual ~FakeProfileSyncService() {} + ~FakeProfileSyncService() override {} static KeyedService* BuildFakeProfileSyncService( content::BrowserContext* context) { @@ -66,12 +66,9 @@ class FakeProfileSyncService : public ProfileSyncService { bool initialized_state_violation() { return initialized_state_violation_; } // ProfileSyncService: - virtual bool SyncActive() const override { - return sync_initialized_; - } + bool SyncActive() const override { return sync_initialized_; } - virtual void AddObserver( - ProfileSyncServiceBase::Observer* observer) override { + void AddObserver(ProfileSyncServiceBase::Observer* observer) override { if (sync_initialized_) initialized_state_violation_ = true; // Set sync initialized state to true so the function will run after @@ -83,7 +80,7 @@ class FakeProfileSyncService : public ProfileSyncService { base::Unretained(observer))); } - virtual syncer::ModelTypeSet GetEncryptedDataTypes() const override { + syncer::ModelTypeSet GetEncryptedDataTypes() const override { if (!sync_initialized_) initialized_state_violation_ = true; syncer::ModelTypeSet type_set; @@ -91,7 +88,7 @@ class FakeProfileSyncService : public ProfileSyncService { return type_set; } - virtual syncer::ModelTypeSet GetPreferredDataTypes() const override { + syncer::ModelTypeSet GetPreferredDataTypes() const override { if (!sync_initialized_) initialized_state_violation_ = true; syncer::ModelTypeSet preferred_types = @@ -114,14 +111,14 @@ class PreferencesPrivateApiTest : public ExtensionApiTest { PreferencesPrivateApiTest() : browser_(NULL), service_(NULL) {} virtual ~PreferencesPrivateApiTest() {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { #if defined(OS_CHROMEOS) command_line->AppendSwitch( chromeos::switches::kIgnoreUserProfileMappingForTests); #endif } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); base::FilePath path; diff --git a/chrome/browser/extensions/api/principals_private/principals_private_api.h b/chrome/browser/extensions/api/principals_private/principals_private_api.h index 16f0ef0..5f5d96e 100644 --- a/chrome/browser/extensions/api/principals_private/principals_private_api.h +++ b/chrome/browser/extensions/api/principals_private/principals_private_api.h @@ -19,12 +19,12 @@ class PrincipalsPrivateExtensionFunction : public ChromeSyncExtensionFunction { PrincipalsPrivateExtensionFunction() {} protected: - virtual ~PrincipalsPrivateExtensionFunction() {} + ~PrincipalsPrivateExtensionFunction() override {} // ExtensionFunction: // Checks for the flag "new-profile-management", if set calls // RunSyncSafe which must be overriden by subclasses. - virtual bool RunSync() override final; + bool RunSync() final; private: virtual bool RunSyncSafe() = 0; @@ -38,11 +38,11 @@ class PrincipalsPrivateSignOutFunction PrincipalsPrivateSignOutFunction() {} protected: - virtual ~PrincipalsPrivateSignOutFunction() {} + ~PrincipalsPrivateSignOutFunction() override {} private: // PrincipalsPrivateExtensionFunction - virtual bool RunSyncSafe() override; + bool RunSyncSafe() override; DISALLOW_COPY_AND_ASSIGN(PrincipalsPrivateSignOutFunction); }; @@ -55,11 +55,11 @@ class PrincipalsPrivateShowAvatarBubbleFunction PrincipalsPrivateShowAvatarBubbleFunction() {} protected: - virtual ~PrincipalsPrivateShowAvatarBubbleFunction() {} + ~PrincipalsPrivateShowAvatarBubbleFunction() override {} private: // PrincipalsPrivateExtensionFunction - virtual bool RunSyncSafe() override; + bool RunSyncSafe() override; DISALLOW_COPY_AND_ASSIGN(PrincipalsPrivateShowAvatarBubbleFunction); }; diff --git a/chrome/browser/extensions/api/processes/processes_api.h b/chrome/browser/extensions/api/processes/processes_api.h index 2963d3f..522354a 100644 --- a/chrome/browser/extensions/api/processes/processes_api.h +++ b/chrome/browser/extensions/api/processes/processes_api.h @@ -34,7 +34,7 @@ class ProcessesEventRouter : public TaskManagerModelObserver, public content::NotificationObserver { public: explicit ProcessesEventRouter(content::BrowserContext* context); - virtual ~ProcessesEventRouter(); + ~ProcessesEventRouter() override; // Called when an extension process wants to listen to process events. void ListenerAdded(); @@ -51,16 +51,16 @@ class ProcessesEventRouter : public TaskManagerModelObserver, private: // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // TaskManagerModelObserver methods. - virtual void OnItemsAdded(int start, int length) override; - virtual void OnModelChanged() override {} - virtual void OnItemsChanged(int start, int length) override; - virtual void OnItemsRemoved(int start, int length) override {} - virtual void OnItemsToBeRemoved(int start, int length) override; + void OnItemsAdded(int start, int length) override; + void OnModelChanged() override {} + void OnItemsChanged(int start, int length) override; + void OnItemsRemoved(int start, int length) override {} + void OnItemsToBeRemoved(int start, int length) override; // Internal helpers for processing notifications. void ProcessHangEvent(content::RenderWidgetHost* widget); @@ -98,10 +98,10 @@ class ProcessesAPI : public BrowserContextKeyedAPI, public EventRouter::Observer { public: explicit ProcessesAPI(content::BrowserContext* context); - virtual ~ProcessesAPI(); + ~ProcessesAPI() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<ProcessesAPI>* GetFactoryInstance(); @@ -112,8 +112,8 @@ class ProcessesAPI : public BrowserContextKeyedAPI, ProcessesEventRouter* processes_event_router(); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<ProcessesAPI>; @@ -138,8 +138,8 @@ class GetProcessIdForTabFunction : public ChromeAsyncExtensionFunction { GetProcessIdForTabFunction(); private: - virtual ~GetProcessIdForTabFunction() {} - virtual bool RunAsync() override; + ~GetProcessIdForTabFunction() override {} + bool RunAsync() override; void GetProcessIdForTab(); @@ -160,8 +160,8 @@ class TerminateFunction : public ChromeAsyncExtensionFunction { TerminateFunction(); private: - virtual ~TerminateFunction() {} - virtual bool RunAsync() override; + ~TerminateFunction() override {} + bool RunAsync() override; void TerminateProcess(); @@ -179,8 +179,8 @@ class GetProcessInfoFunction : public ChromeAsyncExtensionFunction { GetProcessInfoFunction(); private: - virtual ~GetProcessInfoFunction(); - virtual bool RunAsync() override; + ~GetProcessInfoFunction() override; + bool RunAsync() override; void GatherProcessInfo(); diff --git a/chrome/browser/extensions/api/proxy/proxy_api.h b/chrome/browser/extensions/api/proxy/proxy_api.h index aea100f..62cbe73 100644 --- a/chrome/browser/extensions/api/proxy/proxy_api.h +++ b/chrome/browser/extensions/api/proxy/proxy_api.h @@ -28,14 +28,13 @@ class EventRouterForwarder; class ProxyPrefTransformer : public PrefTransformerInterface { public: ProxyPrefTransformer(); - virtual ~ProxyPrefTransformer(); + ~ProxyPrefTransformer() override; // Implementation of PrefTransformerInterface. - virtual base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, - std::string* error, - bool* bad_message) override; - virtual base::Value* BrowserToExtensionPref( - const base::Value* browser_pref) override; + base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, + std::string* error, + bool* bad_message) override; + base::Value* BrowserToExtensionPref(const base::Value* browser_pref) override; private: DISALLOW_COPY_AND_ASSIGN(ProxyPrefTransformer); diff --git a/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.h b/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.h index f74404a..39eb7e1 100644 --- a/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.h +++ b/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher.h @@ -41,18 +41,16 @@ class ObfuscatedGaiaIdFetcher : public OAuth2ApiCallFlow { // TODO(petewil): Someday let's make a profile keyed service to cache // the Gaia ID. explicit ObfuscatedGaiaIdFetcher(Delegate* delegate); - virtual ~ObfuscatedGaiaIdFetcher(); + ~ObfuscatedGaiaIdFetcher() override; static OAuth2TokenService::ScopeSet GetScopes(); protected: // OAuth2ApiCallFlow implementation - virtual GURL CreateApiCallUrl() override; - virtual std::string CreateApiCallBody() override; - virtual void ProcessApiCallSuccess( - const net::URLFetcher* source) override; - virtual void ProcessApiCallFailure( - const net::URLFetcher* source) override; + GURL CreateApiCallUrl() override; + std::string CreateApiCallBody() override; + void ProcessApiCallSuccess(const net::URLFetcher* source) override; + void ProcessApiCallFailure(const net::URLFetcher* source) override; private: FRIEND_TEST_ALL_PREFIXES(ObfuscatedGaiaIdFetcherTest, SetUp); diff --git a/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher_unittest.cc b/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher_unittest.cc index 01c2314f..d26165ca 100644 --- a/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher_unittest.cc +++ b/chrome/browser/extensions/api/push_messaging/obfuscated_gaia_id_fetcher_unittest.cc @@ -20,16 +20,16 @@ static const char kNonDictionaryJsonData[] = "{ 0.5 }"; // Delegate class for catching notifications from the ObfuscatedGaiaIdFetcher. class TestDelegate : public extensions::ObfuscatedGaiaIdFetcher::Delegate { public: - virtual void OnObfuscatedGaiaIdFetchSuccess( + void OnObfuscatedGaiaIdFetchSuccess( const std::string& obfuscated_id) override { succeeded_ = true; } - virtual void OnObfuscatedGaiaIdFetchFailure( + void OnObfuscatedGaiaIdFetchFailure( const GoogleServiceAuthError& error) override { failed_ = true; } TestDelegate() : succeeded_(false), failed_(false) {} - virtual ~TestDelegate() {} + ~TestDelegate() override {} bool succeeded() const { return succeeded_; } bool failed() const { return failed_; } diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h index 4da36f7..854475c 100644 --- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.h +++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.h @@ -34,7 +34,7 @@ class PushMessagingEventRouter : public PushMessagingInvalidationHandlerDelegate { public: explicit PushMessagingEventRouter(content::BrowserContext* context); - virtual ~PushMessagingEventRouter(); + ~PushMessagingEventRouter() override; // For testing purposes. void TriggerMessageForTest(const std::string& extension_id, @@ -43,9 +43,9 @@ class PushMessagingEventRouter private: // InvalidationHandlerDelegate implementation. - virtual void OnMessage(const std::string& extension_id, - int subchannel, - const std::string& payload) override; + void OnMessage(const std::string& extension_id, + int subchannel, + const std::string& payload) override; content::BrowserContext* const browser_context_; @@ -61,10 +61,10 @@ class PushMessagingGetChannelIdFunction PushMessagingGetChannelIdFunction(); protected: - virtual ~PushMessagingGetChannelIdFunction(); + ~PushMessagingGetChannelIdFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; DECLARE_EXTENSION_FUNCTION("pushMessaging.getChannelId", PUSHMESSAGING_GETCHANNELID) @@ -82,21 +82,18 @@ class PushMessagingGetChannelIdFunction void StartAccessTokenFetch(); // OAuth2TokenService::Observer implementation. - virtual void OnRefreshTokenAvailable(const std::string& account_id) override; + void OnRefreshTokenAvailable(const std::string& account_id) override; // OAuth2TokenService::Consumer implementation. - virtual void OnGetTokenSuccess( - const OAuth2TokenService::Request* request, - const std::string& access_token, - const base::Time& expiration_time) override; - virtual void OnGetTokenFailure( - const OAuth2TokenService::Request* request, - const GoogleServiceAuthError& error) override; + void OnGetTokenSuccess(const OAuth2TokenService::Request* request, + const std::string& access_token, + const base::Time& expiration_time) override; + void OnGetTokenFailure(const OAuth2TokenService::Request* request, + const GoogleServiceAuthError& error) override; // ObfuscatedGiaiaIdFetcher::Delegate implementation. - virtual void OnObfuscatedGaiaIdFetchSuccess(const std::string& gaia_id) - override; - virtual void OnObfuscatedGaiaIdFetchFailure( + void OnObfuscatedGaiaIdFetchSuccess(const std::string& gaia_id) override; + void OnObfuscatedGaiaIdFetchFailure( const GoogleServiceAuthError& error) override; scoped_ptr<ObfuscatedGaiaIdFetcher> fetcher_; @@ -110,13 +107,13 @@ class PushMessagingAPI : public BrowserContextKeyedAPI, public ExtensionRegistryObserver { public: explicit PushMessagingAPI(content::BrowserContext* context); - virtual ~PushMessagingAPI(); + ~PushMessagingAPI() override; // Convenience method to get the PushMessagingAPI for a BrowserContext. static PushMessagingAPI* Get(content::BrowserContext* context); // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<PushMessagingAPI>* GetFactoryInstance(); @@ -140,18 +137,16 @@ class PushMessagingAPI : public BrowserContextKeyedAPI, static const bool kServiceIsNULLWhileTesting = true; // Overridden from ExtensionRegistryObserver. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; - virtual void OnExtensionWillBeInstalled( - content::BrowserContext* browser_context, - const Extension* extension, - bool is_update, - bool from_ephemeral, - const std::string& old_name) override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; + void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, + const Extension* extension, + bool is_update, + bool from_ephemeral, + const std::string& old_name) override; // Initialize |event_router_| and |handler_|. bool InitEventRouterAndHandler(); diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc b/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc index 191f60e..65c13d9 100644 --- a/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc +++ b/chrome/browser/extensions/api/push_messaging/push_messaging_apitest.cc @@ -73,7 +73,7 @@ class PushMessagingApiTest : public ExtensionApiTest { : fake_invalidation_service_(NULL) { } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); } @@ -83,7 +83,7 @@ class PushMessagingApiTest : public ExtensionApiTest { ExtensionApiTest::SetUp(); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); fake_invalidation_service_ = static_cast<invalidation::FakeInvalidationService*>( diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc b/chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc index 07bd685..9777a4d 100644 --- a/chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc +++ b/chrome/browser/extensions/api/push_messaging/push_messaging_canary_test.cc @@ -74,9 +74,7 @@ class PushMessagingCanaryTest : public ExtensionApiTest { // InProcessBrowserTest override. Destroys the sync client and sync // profile created by the test. We must clean up ProfileSyncServiceHarness // now before the profile is cleaned up. - virtual void TearDownOnMainThread() override { - sync_setup_helper_.reset(); - } + void TearDownOnMainThread() override { sync_setup_helper_.reset(); } const SyncSetupHelper* sync_setup_helper() const { return sync_setup_helper_.get(); @@ -85,13 +83,13 @@ class PushMessagingCanaryTest : public ExtensionApiTest { protected: // Override InProcessBrowserTest. Change behavior of the default host // resolver to avoid DNS lookup errors, so we can make network calls. - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { // The resolver object lifetime is managed by sync_test_setup, not here. EnableDNSLookupForThisTest( new net::RuleBasedHostResolverProc(host_resolver())); } - virtual void TearDownInProcessBrowserTestFixture() override { + void TearDownInProcessBrowserTestFixture() override { DisableDNSLookupForThisTest(); } diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.h b/chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.h index 0f3ca9e..cdfb7df 100644 --- a/chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.h +++ b/chrome/browser/extensions/api/push_messaging/push_messaging_invalidation_handler.h @@ -36,20 +36,19 @@ class PushMessagingInvalidationHandler : public PushMessagingInvalidationMapper, PushMessagingInvalidationHandler( invalidation::InvalidationService* service, PushMessagingInvalidationHandlerDelegate* delegate); - virtual ~PushMessagingInvalidationHandler(); + ~PushMessagingInvalidationHandler() override; // PushMessagingInvalidationMapper implementation. - virtual void SuppressInitialInvalidationsForExtension( + void SuppressInitialInvalidationsForExtension( const std::string& extension_id) override; - virtual void RegisterExtension(const std::string& extension_id) override; - virtual void UnregisterExtension(const std::string& extension_id) override; + void RegisterExtension(const std::string& extension_id) override; + void UnregisterExtension(const std::string& extension_id) override; // InvalidationHandler implementation. - virtual void OnInvalidatorStateChange( - syncer::InvalidatorState state) override; - virtual void OnIncomingInvalidation( + void OnInvalidatorStateChange(syncer::InvalidatorState state) override; + void OnIncomingInvalidation( const syncer::ObjectIdInvalidationMap& invalidation_map) override; - virtual std::string GetOwnerName() const override; + std::string GetOwnerName() const override; const std::set<std::string>& GetRegisteredExtensionsForTest() const { return registered_extensions_; diff --git a/chrome/browser/extensions/api/reading_list_private/reading_list_private_api.h b/chrome/browser/extensions/api/reading_list_private/reading_list_private_api.h index feed7b5..938ad6b 100644 --- a/chrome/browser/extensions/api/reading_list_private/reading_list_private_api.h +++ b/chrome/browser/extensions/api/reading_list_private/reading_list_private_api.h @@ -21,10 +21,10 @@ class ReadingListPrivateAddEntryFunction : public ChromeAsyncExtensionFunction { READINGLISTPRIVATE_ADDENTRY) protected: - virtual ~ReadingListPrivateAddEntryFunction() {} + ~ReadingListPrivateAddEntryFunction() override {} // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; }; class ReadingListPrivateRemoveEntryFunction @@ -34,10 +34,10 @@ class ReadingListPrivateRemoveEntryFunction READINGLISTPRIVATE_REMOVEENTRY) protected: - virtual ~ReadingListPrivateRemoveEntryFunction() {} + ~ReadingListPrivateRemoveEntryFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class ReadingListPrivateGetEntriesFunction @@ -47,10 +47,10 @@ class ReadingListPrivateGetEntriesFunction READINGLISTPRIVATE_GETENTRIES) protected: - virtual ~ReadingListPrivateGetEntriesFunction() {} + ~ReadingListPrivateGetEntriesFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h index 909b741..4684904f 100644 --- a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h +++ b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h @@ -33,29 +33,28 @@ class ChromeRuntimeAPIDelegate : public extensions::RuntimeAPIDelegate, public content::NotificationObserver { public: explicit ChromeRuntimeAPIDelegate(content::BrowserContext* context); - virtual ~ChromeRuntimeAPIDelegate(); + ~ChromeRuntimeAPIDelegate() override; private: friend class extensions::RuntimeAPI; // extensions::RuntimeAPIDelegate implementation. - virtual void AddUpdateObserver(extensions::UpdateObserver* observer) override; - virtual void RemoveUpdateObserver( - extensions::UpdateObserver* observer) override; - virtual base::Version GetPreviousExtensionVersion( + void AddUpdateObserver(extensions::UpdateObserver* observer) override; + void RemoveUpdateObserver(extensions::UpdateObserver* observer) override; + base::Version GetPreviousExtensionVersion( const extensions::Extension* extension) override; - virtual void ReloadExtension(const std::string& extension_id) override; - virtual bool CheckForUpdates(const std::string& extension_id, - const UpdateCheckCallback& callback) override; - virtual void OpenURL(const GURL& uninstall_url) override; - virtual bool GetPlatformInfo( + void ReloadExtension(const std::string& extension_id) override; + bool CheckForUpdates(const std::string& extension_id, + const UpdateCheckCallback& callback) override; + void OpenURL(const GURL& uninstall_url) override; + bool GetPlatformInfo( extensions::core_api::runtime::PlatformInfo* info) override; - virtual bool RestartDevice(std::string* error_message) override; + bool RestartDevice(std::string* error_message) override; // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; void UpdateCheckComplete(const std::string& extension_id); void CallUpdateCallbacks(const std::string& extension_id, diff --git a/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.h b/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.h index 1875eb7..75fc81d 100644 --- a/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.h +++ b/chrome/browser/extensions/api/screenlock_private/screenlock_private_api.h @@ -18,10 +18,10 @@ class ScreenlockPrivateGetLockedFunction : public ChromeAsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("screenlockPrivate.getLocked", SCREENLOCKPRIVATE_GETLOCKED) ScreenlockPrivateGetLockedFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; private: - virtual ~ScreenlockPrivateGetLockedFunction(); + ~ScreenlockPrivateGetLockedFunction() override; DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateGetLockedFunction); }; @@ -30,10 +30,10 @@ class ScreenlockPrivateSetLockedFunction : public ChromeAsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("screenlockPrivate.setLocked", SCREENLOCKPRIVATE_SETLOCKED) ScreenlockPrivateSetLockedFunction(); - virtual bool RunAsync() override; + bool RunAsync() override; private: - virtual ~ScreenlockPrivateSetLockedFunction(); + ~ScreenlockPrivateSetLockedFunction() override; DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateSetLockedFunction); }; @@ -43,10 +43,10 @@ class ScreenlockPrivateAcceptAuthAttemptFunction DECLARE_EXTENSION_FUNCTION("screenlockPrivate.acceptAuthAttempt", SCREENLOCKPRIVATE_ACCEPTAUTHATTEMPT) ScreenlockPrivateAcceptAuthAttemptFunction(); - virtual bool RunSync() override; + bool RunSync() override; private: - virtual ~ScreenlockPrivateAcceptAuthAttemptFunction(); + ~ScreenlockPrivateAcceptAuthAttemptFunction() override; DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateAcceptAuthAttemptFunction); }; @@ -54,7 +54,7 @@ class ScreenlockPrivateEventRouter : public extensions::BrowserContextKeyedAPI, public ScreenlockBridge::Observer { public: explicit ScreenlockPrivateEventRouter(content::BrowserContext* context); - virtual ~ScreenlockPrivateEventRouter(); + ~ScreenlockPrivateEventRouter() override; bool OnAuthAttempted(ScreenlockBridge::LockHandler::AuthType auth_type, const std::string& value); @@ -63,12 +63,12 @@ class ScreenlockPrivateEventRouter : public extensions::BrowserContextKeyedAPI, static extensions::BrowserContextKeyedAPIFactory< ScreenlockPrivateEventRouter>* GetFactoryInstance(); - virtual void Shutdown() override; + void Shutdown() override; // ScreenlockBridge::Observer - virtual void OnScreenDidLock() override; - virtual void OnScreenDidUnlock() override; - virtual void OnFocusedUserChanged(const std::string& user_id) override; + void OnScreenDidLock() override; + void OnScreenDidUnlock() override; + void OnFocusedUserChanged(const std::string& user_id) override; private: friend class extensions::BrowserContextKeyedAPIFactory< diff --git a/chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc b/chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc index 535742b..93d99ae 100644 --- a/chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc +++ b/chrome/browser/extensions/api/screenlock_private/screenlock_private_apitest.cc @@ -32,7 +32,7 @@ class ScreenlockPrivateApiTest : public ExtensionApiTest, virtual ~ScreenlockPrivateApiTest() {} // ExtensionApiTest - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( extensions::switches::kWhitelistedExtensionID, kTestExtensionId); @@ -43,7 +43,7 @@ class ScreenlockPrivateApiTest : public ExtensionApiTest, #endif } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { SigninManagerFactory::GetForProfile(profile()) ->SetAuthenticatedUsername(kTestUser); ExtensionApiTest::SetUpOnMainThread(); @@ -51,7 +51,7 @@ class ScreenlockPrivateApiTest : public ExtensionApiTest, protected: // ExtensionApiTest override: - virtual void RunTestOnMainThreadLoop() override { + void RunTestOnMainThreadLoop() override { registrar_.Add(this, extensions::NOTIFICATION_EXTENSION_TEST_MESSAGE, content::NotificationService::AllSources()); @@ -60,9 +60,9 @@ class ScreenlockPrivateApiTest : public ExtensionApiTest, } // content::NotificationObserver override: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { const std::string& content = *content::Details<std::string>(details).ptr(); if (content == kAttemptClickAuthMessage) { ScreenlockBridge::Get()->lock_handler()->SetAuthType( diff --git a/chrome/browser/extensions/api/sessions/sessions_api.h b/chrome/browser/extensions/api/sessions/sessions_api.h index 86c4c8b..8f572c0 100644 --- a/chrome/browser/extensions/api/sessions/sessions_api.h +++ b/chrome/browser/extensions/api/sessions/sessions_api.h @@ -28,8 +28,8 @@ class SessionId; class SessionsGetRecentlyClosedFunction : public ChromeSyncExtensionFunction { protected: - virtual ~SessionsGetRecentlyClosedFunction() {} - virtual bool RunSync() override; + ~SessionsGetRecentlyClosedFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("sessions.getRecentlyClosed", SESSIONS_GETRECENTLYCLOSED) @@ -46,8 +46,8 @@ class SessionsGetRecentlyClosedFunction : public ChromeSyncExtensionFunction { class SessionsGetDevicesFunction : public ChromeSyncExtensionFunction { protected: - virtual ~SessionsGetDevicesFunction() {} - virtual bool RunSync() override; + ~SessionsGetDevicesFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("sessions.getDevices", SESSIONS_GETDEVICES) private: @@ -67,8 +67,8 @@ class SessionsGetDevicesFunction : public ChromeSyncExtensionFunction { class SessionsRestoreFunction : public ChromeSyncExtensionFunction { protected: - virtual ~SessionsRestoreFunction() {} - virtual bool RunSync() override; + ~SessionsRestoreFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("sessions.restore", SESSIONS_RESTORE) private: @@ -84,16 +84,16 @@ class SessionsRestoreFunction : public ChromeSyncExtensionFunction { class SessionsEventRouter : public TabRestoreServiceObserver { public: explicit SessionsEventRouter(Profile* profile); - virtual ~SessionsEventRouter(); + ~SessionsEventRouter() override; // Observer callback for TabRestoreServiceObserver. Sends data on // recently closed tabs to the javascript side of this page to // display to the user. - virtual void TabRestoreServiceChanged(TabRestoreService* service) override; + void TabRestoreServiceChanged(TabRestoreService* service) override; // Observer callback to notice when our associated TabRestoreService // is destroyed. - virtual void TabRestoreServiceDestroyed(TabRestoreService* service) override; + void TabRestoreServiceDestroyed(TabRestoreService* service) override; private: Profile* profile_; @@ -108,17 +108,16 @@ class SessionsAPI : public BrowserContextKeyedAPI, public extensions::EventRouter::Observer { public: explicit SessionsAPI(content::BrowserContext* context); - virtual ~SessionsAPI(); + ~SessionsAPI() override; // BrowserContextKeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<SessionsAPI>* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const extensions::EventListenerInfo& details) - override; + void OnListenerAdded(const extensions::EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<SessionsAPI>; diff --git a/chrome/browser/extensions/api/sessions/sessions_apitest.cc b/chrome/browser/extensions/api/sessions/sessions_apitest.cc index db36a7d..b505229 100644 --- a/chrome/browser/extensions/api/sessions/sessions_apitest.cc +++ b/chrome/browser/extensions/api/sessions/sessions_apitest.cc @@ -84,8 +84,9 @@ void BuildTabSpecifics(const std::string& tag, int window_id, int tab_id, class ExtensionSessionsTest : public InProcessBrowserTest { public: - virtual void SetUpCommandLine(CommandLine* command_line) override; - virtual void SetUpOnMainThread() override; + void SetUpCommandLine(CommandLine* command_line) override; + void SetUpOnMainThread() override; + protected: static KeyedService* BuildProfileSyncService( content::BrowserContext* profile); diff --git a/chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h b/chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h index 4c5db03..e0dad1c 100644 --- a/chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h +++ b/chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h @@ -23,7 +23,7 @@ class SettingsOverridesAPI : public BrowserContextKeyedAPI, public ExtensionRegistryObserver { public: explicit SettingsOverridesAPI(content::BrowserContext* context); - virtual ~SettingsOverridesAPI(); + ~SettingsOverridesAPI() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<SettingsOverridesAPI>* @@ -42,15 +42,14 @@ class SettingsOverridesAPI : public BrowserContextKeyedAPI, const std::string& pref_key); // ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; void OnTemplateURLsLoaded(); diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h index c7c73bc..1d1c092 100644 --- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h +++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api.h @@ -39,10 +39,10 @@ ScopedVector<sync_driver::DeviceInfo> GetAllSignedInDevices( class SignedInDevicesGetFunction : public ChromeSyncExtensionFunction { protected: - virtual ~SignedInDevicesGetFunction() {} + ~SignedInDevicesGetFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("signedInDevices.get", SIGNED_IN_DEVICES_GET) }; diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc index 6a1e8d1..c0c24ad 100644 --- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc +++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_api_unittest.cc @@ -30,9 +30,9 @@ namespace extensions { class MockDeviceInfoTracker : public DeviceInfoTracker { public: - virtual ~MockDeviceInfoTracker() {} + ~MockDeviceInfoTracker() override {} - virtual scoped_ptr<DeviceInfo> GetDeviceInfo( + scoped_ptr<DeviceInfo> GetDeviceInfo( const std::string& client_id) const override { NOTREACHED(); return scoped_ptr<DeviceInfo>(); @@ -47,7 +47,7 @@ class MockDeviceInfoTracker : public DeviceInfoTracker { device_info->signin_scoped_device_id()); } - virtual ScopedVector<DeviceInfo> GetAllDeviceInfo() const override { + ScopedVector<DeviceInfo> GetAllDeviceInfo() const override { ScopedVector<DeviceInfo> list; for (std::vector<const DeviceInfo*>::const_iterator iter = devices_.begin(); @@ -59,9 +59,9 @@ class MockDeviceInfoTracker : public DeviceInfoTracker { return list.Pass(); } - virtual void AddObserver(Observer* observer) override { NOTREACHED(); } + void AddObserver(Observer* observer) override { NOTREACHED(); } - virtual void RemoveObserver(Observer* observer) override { NOTREACHED(); } + void RemoveObserver(Observer* observer) override { NOTREACHED(); } void Add(const DeviceInfo* device) { devices_.push_back(device); } diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.h b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.h index 2131670..b94f8f3 100644 --- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.h +++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.h @@ -44,7 +44,7 @@ class SignedInDevicesChangeObserver Profile* profile); virtual ~SignedInDevicesChangeObserver(); - virtual void OnDeviceInfoChange() override; + void OnDeviceInfoChange() override; const std::string& extension_id() { return extension_id_; @@ -63,21 +63,20 @@ class SignedInDevicesManager : public BrowserContextKeyedAPI, // Default constructor used for testing. SignedInDevicesManager(); explicit SignedInDevicesManager(content::BrowserContext* context); - virtual ~SignedInDevicesManager(); + ~SignedInDevicesManager() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<SignedInDevicesManager>* GetFactoryInstance(); // ExtensionRegistryObserver implementation. - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // EventRouter::Observer: - virtual void OnListenerAdded(const EventListenerInfo& details) override; - virtual void OnListenerRemoved(const EventListenerInfo& details) override; + void OnListenerAdded(const EventListenerInfo& details) override; + void OnListenerRemoved(const EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<SignedInDevicesManager>; diff --git a/chrome/browser/extensions/api/socket/socket_apitest.cc b/chrome/browser/extensions/api/socket/socket_apitest.cc index 60f50b2..9ffb231 100644 --- a/chrome/browser/extensions/api/socket/socket_apitest.cc +++ b/chrome/browser/extensions/api/socket/socket_apitest.cc @@ -33,12 +33,12 @@ class SocketApiTest : public ExtensionApiTest { new extensions::MockHostResolverCreator()) { } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { extensions::HostResolverWrapper::GetInstance()->SetHostResolverForTesting( resolver_creator_->CreateMockHostResolver()); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { extensions::HostResolverWrapper::GetInstance()-> SetHostResolverForTesting(NULL); resolver_creator_->DeleteMockHostResolver(); diff --git a/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc b/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc index 85af659..02157e3 100644 --- a/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc +++ b/chrome/browser/extensions/api/sockets_tcp/sockets_tcp_apitest.cc @@ -38,12 +38,12 @@ class SocketsTcpApiTest : public ExtensionApiTest { new extensions::MockHostResolverCreator()) { } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { extensions::HostResolverWrapper::GetInstance()->SetHostResolverForTesting( resolver_creator_->CreateMockHostResolver()); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { extensions::HostResolverWrapper::GetInstance()-> SetHostResolverForTesting(NULL); resolver_creator_->DeleteMockHostResolver(); diff --git a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_apitest.cc b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_apitest.cc index ee939aa..ef03398 100644 --- a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_apitest.cc +++ b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_apitest.cc @@ -46,12 +46,12 @@ class SocketsTcpServerApiTest : public ExtensionApiTest { new extensions::MockHostResolverCreator()) { } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { extensions::HostResolverWrapper::GetInstance()->SetHostResolverForTesting( resolver_creator_->CreateMockHostResolver()); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { extensions::HostResolverWrapper::GetInstance()-> SetHostResolverForTesting(NULL); resolver_creator_->DeleteMockHostResolver(); diff --git a/chrome/browser/extensions/api/sockets_udp/sockets_udp_apitest.cc b/chrome/browser/extensions/api/sockets_udp/sockets_udp_apitest.cc index 332f136..c2b85f8 100644 --- a/chrome/browser/extensions/api/sockets_udp/sockets_udp_apitest.cc +++ b/chrome/browser/extensions/api/sockets_udp/sockets_udp_apitest.cc @@ -42,12 +42,12 @@ class SocketsUdpApiTest : public ExtensionApiTest { new extensions::MockHostResolverCreator()) { } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { extensions::HostResolverWrapper::GetInstance()->SetHostResolverForTesting( resolver_creator_->CreateMockHostResolver()); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { extensions::HostResolverWrapper::GetInstance()-> SetHostResolverForTesting(NULL); resolver_creator_->DeleteMockHostResolver(); diff --git a/chrome/browser/extensions/api/spellcheck/spellcheck_api.h b/chrome/browser/extensions/api/spellcheck/spellcheck_api.h index 382f074..9c976af 100644 --- a/chrome/browser/extensions/api/spellcheck/spellcheck_api.h +++ b/chrome/browser/extensions/api/spellcheck/spellcheck_api.h @@ -16,7 +16,7 @@ class SpellcheckAPI : public BrowserContextKeyedAPI, public ExtensionRegistryObserver { public: explicit SpellcheckAPI(content::BrowserContext* context); - virtual ~SpellcheckAPI(); + ~SpellcheckAPI() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<SpellcheckAPI>* GetFactoryInstance(); @@ -25,12 +25,11 @@ class SpellcheckAPI : public BrowserContextKeyedAPI, friend class BrowserContextKeyedAPIFactory<SpellcheckAPI>; // ExtensionRegistryObserver implementation. - virtual void OnExtensionLoaded(content::BrowserContext* browser_context, - const Extension* extension) override; - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionLoaded(content::BrowserContext* browser_context, + const Extension* extension) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // BrowserContextKeyedAPI implementation. static const char* service_name() { diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc index 2454126..2d3b0cc 100644 --- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc +++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc @@ -68,20 +68,18 @@ class ManagedValueStoreCache::ExtensionTracker : public ExtensionRegistryObserver { public: explicit ExtensionTracker(Profile* profile); - virtual ~ExtensionTracker() {} + ~ExtensionTracker() override {} private: // ExtensionRegistryObserver implementation. - virtual void OnExtensionWillBeInstalled( - content::BrowserContext* browser_context, - const Extension* extension, - bool is_update, - bool from_ephemeral, - const std::string& old_name) override; - virtual void OnExtensionUninstalled( - content::BrowserContext* browser_context, - const Extension* extension, - extensions::UninstallReason reason) override; + void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, + const Extension* extension, + bool is_update, + bool from_ephemeral, + const std::string& old_name) override; + void OnExtensionUninstalled(content::BrowserContext* browser_context, + const Extension* extension, + extensions::UninstallReason reason) override; // Handler for the signal from ExtensionSystem::ready(). void OnExtensionsReady(); diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.h b/chrome/browser/extensions/api/storage/managed_value_store_cache.h index b33407c..a4202be 100644 --- a/chrome/browser/extensions/api/storage/managed_value_store_cache.h +++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.h @@ -46,7 +46,7 @@ class ManagedValueStoreCache : public ValueStoreCache, ManagedValueStoreCache(content::BrowserContext* context, const scoped_refptr<SettingsStorageFactory>& factory, const scoped_refptr<SettingsObserverList>& observers); - virtual ~ManagedValueStoreCache(); + ~ManagedValueStoreCache() override; private: class ExtensionTracker; @@ -56,17 +56,17 @@ class ManagedValueStoreCache : public ValueStoreCache, PolicyValueStoreMap; // ValueStoreCache implementation: - virtual void ShutdownOnUI() override; - virtual void RunWithValueStoreForExtension( + void ShutdownOnUI() override; + void RunWithValueStoreForExtension( const StorageCallback& callback, scoped_refptr<const Extension> extension) override; - virtual void DeleteStorageSoon(const std::string& extension_id) override; + void DeleteStorageSoon(const std::string& extension_id) override; // PolicyService::Observer implementation: - virtual void OnPolicyServiceInitialized(policy::PolicyDomain domain) override; - virtual void OnPolicyUpdated(const policy::PolicyNamespace& ns, - const policy::PolicyMap& previous, - const policy::PolicyMap& current) override; + void OnPolicyServiceInitialized(policy::PolicyDomain domain) override; + void OnPolicyUpdated(const policy::PolicyNamespace& ns, + const policy::PolicyMap& previous, + const policy::PolicyMap& current) override; // Posted by OnPolicyUpdated() to update a PolicyValueStore on the FILE // thread. diff --git a/chrome/browser/extensions/api/storage/policy_value_store.h b/chrome/browser/extensions/api/storage/policy_value_store.h index ee2c55a..5a43de8 100644 --- a/chrome/browser/extensions/api/storage/policy_value_store.h +++ b/chrome/browser/extensions/api/storage/policy_value_store.h @@ -30,7 +30,7 @@ class PolicyValueStore : public ValueStore { PolicyValueStore(const std::string& extension_id, const scoped_refptr<SettingsObserverList>& observers, scoped_ptr<ValueStore> delegate); - virtual ~PolicyValueStore(); + ~PolicyValueStore() override; // Stores |policy| in the persistent database represented by the |delegate_| // and notifies observers with the changes from the previous policy. @@ -40,24 +40,23 @@ class PolicyValueStore : public ValueStore { void DeleteStorage(); // ValueStore implementation: - virtual size_t GetBytesInUse(const std::string& key) override; - virtual size_t GetBytesInUse(const std::vector<std::string>& keys) override; - virtual size_t GetBytesInUse() override; - virtual ReadResult Get(const std::string& key) override; - virtual ReadResult Get(const std::vector<std::string>& keys) override; - virtual ReadResult Get() override; - virtual WriteResult Set( - WriteOptions options, - const std::string& key, - const base::Value& value) override; - virtual WriteResult Set( - WriteOptions options, const base::DictionaryValue& values) override; - virtual WriteResult Remove(const std::string& key) override; - virtual WriteResult Remove(const std::vector<std::string>& keys) override; - virtual WriteResult Clear() override; + size_t GetBytesInUse(const std::string& key) override; + size_t GetBytesInUse(const std::vector<std::string>& keys) override; + size_t GetBytesInUse() override; + ReadResult Get(const std::string& key) override; + ReadResult Get(const std::vector<std::string>& keys) override; + ReadResult Get() override; + WriteResult Set(WriteOptions options, + const std::string& key, + const base::Value& value) override; + WriteResult Set(WriteOptions options, + const base::DictionaryValue& values) override; + WriteResult Remove(const std::string& key) override; + WriteResult Remove(const std::vector<std::string>& keys) override; + WriteResult Clear() override; // Hopefully, as a Read-Only database, there is no reason to use these. - virtual bool Restore() override; - virtual bool RestoreKey(const std::string& key) override; + bool Restore() override; + bool RestoreKey(const std::string& key) override; // For unit tests. ValueStore* delegate() { return delegate_.get(); } diff --git a/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc b/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc index 1af72db..72c283a 100644 --- a/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc +++ b/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc @@ -45,31 +45,28 @@ class MutablePolicyValueStore : public PolicyValueStore { : PolicyValueStore(kTestExtensionId, make_scoped_refptr(new SettingsObserverList()), scoped_ptr<ValueStore>(new LeveldbValueStore(path))) {} - virtual ~MutablePolicyValueStore() {} + ~MutablePolicyValueStore() override {} - virtual WriteResult Set( - WriteOptions options, - const std::string& key, - const base::Value& value) override { + WriteResult Set(WriteOptions options, + const std::string& key, + const base::Value& value) override { return delegate()->Set(options, key, value); } - virtual WriteResult Set( - WriteOptions options, const base::DictionaryValue& values) override { + WriteResult Set(WriteOptions options, + const base::DictionaryValue& values) override { return delegate()->Set(options, values); } - virtual WriteResult Remove(const std::string& key) override { + WriteResult Remove(const std::string& key) override { return delegate()->Remove(key); } - virtual WriteResult Remove(const std::vector<std::string>& keys) override { + WriteResult Remove(const std::vector<std::string>& keys) override { return delegate()->Remove(keys); } - virtual WriteResult Clear() override { - return delegate()->Clear(); - } + WriteResult Clear() override { return delegate()->Clear(); } private: DISALLOW_COPY_AND_ASSIGN(MutablePolicyValueStore); diff --git a/chrome/browser/extensions/api/storage/settings_apitest.cc b/chrome/browser/extensions/api/storage/settings_apitest.cc index a1dc479..661af54 100644 --- a/chrome/browser/extensions/api/storage/settings_apitest.cc +++ b/chrome/browser/extensions/api/storage/settings_apitest.cc @@ -74,7 +74,7 @@ class MockSchemaRegistryObserver : public policy::SchemaRegistry::Observer { class ExtensionSettingsApiTest : public ExtensionApiTest { protected: - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); #if defined(ENABLE_CONFIGURATION_POLICY) diff --git a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc index b099fc0..752b899 100644 --- a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc +++ b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc @@ -95,7 +95,7 @@ class MockSyncChangeProcessor : public syncer::SyncChangeProcessor { MockSyncChangeProcessor() : fail_all_requests_(false) {} // syncer::SyncChangeProcessor implementation. - virtual syncer::SyncError ProcessSyncChanges( + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override { if (fail_all_requests_) { @@ -112,8 +112,7 @@ class MockSyncChangeProcessor : public syncer::SyncChangeProcessor { return syncer::SyncError(); } - virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const - override { + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override { return syncer::SyncDataList(); } @@ -171,8 +170,8 @@ class TestingValueStoreFactory : public SettingsStorageFactory { } // SettingsStorageFactory implementation. - virtual ValueStore* Create(const base::FilePath& base_path, - const std::string& extension_id) override { + ValueStore* Create(const base::FilePath& base_path, + const std::string& extension_id) override { TestingValueStore* new_storage = new TestingValueStore(); DCHECK(!created_.count(extension_id)); created_[extension_id] = new_storage; @@ -181,13 +180,12 @@ class TestingValueStoreFactory : public SettingsStorageFactory { // Testing value stores don't actually create a real database. Don't delete // any files. - virtual void DeleteDatabaseIfExists( - const base::FilePath& base_path, - const std::string& extension_id) override {} + void DeleteDatabaseIfExists(const base::FilePath& base_path, + const std::string& extension_id) override {} private: // SettingsStorageFactory is refcounted. - virtual ~TestingValueStoreFactory() {} + ~TestingValueStoreFactory() override {} // None of these storage areas are owned by this factory, so care must be // taken when calling GetExisting. diff --git a/chrome/browser/extensions/api/storage/sync_storage_backend.h b/chrome/browser/extensions/api/storage/sync_storage_backend.h index ad81677..080fa8e 100644 --- a/chrome/browser/extensions/api/storage/sync_storage_backend.h +++ b/chrome/browser/extensions/api/storage/sync_storage_backend.h @@ -45,23 +45,22 @@ class SyncStorageBackend : public syncer::SyncableService { syncer::ModelType sync_type, const syncer::SyncableService::StartSyncFlare& flare); - virtual ~SyncStorageBackend(); + ~SyncStorageBackend() override; virtual ValueStore* GetStorage(const std::string& extension_id); virtual void DeleteStorage(const std::string& extension_id); // syncer::SyncableService implementation. - virtual syncer::SyncDataList GetAllSyncData(syncer::ModelType type) - const override; - virtual syncer::SyncMergeResult MergeDataAndStartSyncing( + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; + syncer::SyncMergeResult MergeDataAndStartSyncing( syncer::ModelType type, const syncer::SyncDataList& initial_sync_data, scoped_ptr<syncer::SyncChangeProcessor> sync_processor, scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) override; - virtual syncer::SyncError ProcessSyncChanges( + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override; - virtual void StopSyncing(syncer::ModelType type) override; + void StopSyncing(syncer::ModelType type) override; private: // Gets a weak reference to the storage area for a given extension, diff --git a/chrome/browser/extensions/api/storage/sync_value_store_cache.h b/chrome/browser/extensions/api/storage/sync_value_store_cache.h index a66300c..5f1a1f5 100644 --- a/chrome/browser/extensions/api/storage/sync_value_store_cache.h +++ b/chrome/browser/extensions/api/storage/sync_value_store_cache.h @@ -34,15 +34,15 @@ class SyncValueStoreCache : public ValueStoreCache { const scoped_refptr<SettingsStorageFactory>& factory, const scoped_refptr<SettingsObserverList>& observers, const base::FilePath& profile_path); - virtual ~SyncValueStoreCache(); + ~SyncValueStoreCache() override; syncer::SyncableService* GetSyncableService(syncer::ModelType type) const; // ValueStoreCache implementation: - virtual void RunWithValueStoreForExtension( + void RunWithValueStoreForExtension( const StorageCallback& callback, scoped_refptr<const Extension> extension) override; - virtual void DeleteStorageSoon(const std::string& extension_id) override; + void DeleteStorageSoon(const std::string& extension_id) override; private: void InitOnFileThread(const scoped_refptr<SettingsStorageFactory>& factory, diff --git a/chrome/browser/extensions/api/storage/syncable_settings_storage.h b/chrome/browser/extensions/api/storage/syncable_settings_storage.h index b278aca..a5fb150 100644 --- a/chrome/browser/extensions/api/storage/syncable_settings_storage.h +++ b/chrome/browser/extensions/api/storage/syncable_settings_storage.h @@ -31,26 +31,25 @@ class SyncableSettingsStorage : public ValueStore { syncer::ModelType sync_type, const syncer::SyncableService::StartSyncFlare& flare); - virtual ~SyncableSettingsStorage(); + ~SyncableSettingsStorage() override; // ValueStore implementation. - virtual size_t GetBytesInUse(const std::string& key) override; - virtual size_t GetBytesInUse(const std::vector<std::string>& keys) override; - virtual size_t GetBytesInUse() override; - virtual ReadResult Get(const std::string& key) override; - virtual ReadResult Get(const std::vector<std::string>& keys) override; - virtual ReadResult Get() override; - virtual WriteResult Set( - WriteOptions options, - const std::string& key, - const base::Value& value) override; - virtual WriteResult Set( - WriteOptions options, const base::DictionaryValue& values) override; - virtual WriteResult Remove(const std::string& key) override; - virtual WriteResult Remove(const std::vector<std::string>& keys) override; - virtual WriteResult Clear() override; - virtual bool Restore() override; - virtual bool RestoreKey(const std::string& key) override; + size_t GetBytesInUse(const std::string& key) override; + size_t GetBytesInUse(const std::vector<std::string>& keys) override; + size_t GetBytesInUse() override; + ReadResult Get(const std::string& key) override; + ReadResult Get(const std::vector<std::string>& keys) override; + ReadResult Get() override; + WriteResult Set(WriteOptions options, + const std::string& key, + const base::Value& value) override; + WriteResult Set(WriteOptions options, + const base::DictionaryValue& values) override; + WriteResult Remove(const std::string& key) override; + WriteResult Remove(const std::vector<std::string>& keys) override; + WriteResult Clear() override; + bool Restore() override; + bool RestoreKey(const std::string& key) override; // Sync-related methods, analogous to those on SyncableService (handled by // ExtensionSettings), but with looser guarantees about when the methods diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.h b/chrome/browser/extensions/api/streams_private/streams_private_api.h index f416ac1..32f9cdf 100644 --- a/chrome/browser/extensions/api/streams_private/streams_private_api.h +++ b/chrome/browser/extensions/api/streams_private/streams_private_api.h @@ -29,7 +29,7 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI, static StreamsPrivateAPI* Get(content::BrowserContext* context); explicit StreamsPrivateAPI(content::BrowserContext* context); - virtual ~StreamsPrivateAPI(); + ~StreamsPrivateAPI() override; // Send the onExecuteMimeTypeHandler event to |extension_id|. // |web_contents| is used to determine the tabId where the document is being @@ -56,10 +56,9 @@ class StreamsPrivateAPI : public BrowserContextKeyedAPI, linked_ptr<content::StreamHandle> > > StreamMap; // ExtensionRegistryObserver implementation. - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // BrowserContextKeyedAPI implementation. static const char* service_name() { @@ -85,10 +84,10 @@ class StreamsPrivateAbortFunction : public UIThreadExtensionFunction { DECLARE_EXTENSION_FUNCTION("streamsPrivate.abort", STREAMSPRIVATE_ABORT) protected: - virtual ~StreamsPrivateAbortFunction() {} + ~StreamsPrivateAbortFunction() override {} // ExtensionFunction: - virtual ExtensionFunction::ResponseAction Run() override; + ExtensionFunction::ResponseAction Run() override; private: void OnClose(); diff --git a/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc b/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc index 39c87bc..a066772 100644 --- a/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc +++ b/chrome/browser/extensions/api/streams_private/streams_private_apitest.cc @@ -134,7 +134,7 @@ class StreamsPrivateApiTest : public ExtensionApiTest { virtual ~StreamsPrivateApiTest() {} - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { // Init test server. test_server_.reset(new EmbeddedTestServer); ASSERT_TRUE(test_server_->InitializeAndWaitUntilReady()); @@ -143,7 +143,7 @@ class StreamsPrivateApiTest : public ExtensionApiTest { ExtensionApiTest::SetUpOnMainThread(); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { // Tear down the test server. EXPECT_TRUE(test_server_->ShutdownAndWaitUntilComplete()); test_server_.reset(); diff --git a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h index e50c9c6..413f699 100644 --- a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h +++ b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.h @@ -30,25 +30,24 @@ class ExtensionSyncEventObserver : public sync_file_system::SyncEventObserver, GetFactoryInstance(); explicit ExtensionSyncEventObserver(content::BrowserContext* context); - virtual ~ExtensionSyncEventObserver(); + ~ExtensionSyncEventObserver() override; void InitializeForService( sync_file_system::SyncFileSystemService* sync_service); // KeyedService override. - virtual void Shutdown() override; + void Shutdown() override; // sync_file_system::SyncEventObserver interface implementation. - virtual void OnSyncStateUpdated( - const GURL& app_origin, - sync_file_system::SyncServiceState state, - const std::string& description) override; - - virtual void OnFileSynced(const storage::FileSystemURL& url, - sync_file_system::SyncFileType file_type, - sync_file_system::SyncFileStatus status, - sync_file_system::SyncAction action, - sync_file_system::SyncDirection direction) override; + void OnSyncStateUpdated(const GURL& app_origin, + sync_file_system::SyncServiceState state, + const std::string& description) override; + + void OnFileSynced(const storage::FileSystemURL& url, + sync_file_system::SyncFileType file_type, + sync_file_system::SyncFileStatus status, + sync_file_system::SyncAction action, + sync_file_system::SyncDirection direction) override; private: friend class BrowserContextKeyedAPIFactory<ExtensionSyncEventObserver>; diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h index a8f90f7..2d6ffd0 100644 --- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h +++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_api.h @@ -30,8 +30,8 @@ class SyncFileSystemDeleteFileSystemFunction // SYNCFILESYSTEM_DELETEFILESYSTEM) protected: - virtual ~SyncFileSystemDeleteFileSystemFunction() {} - virtual bool RunAsync() override; + ~SyncFileSystemDeleteFileSystemFunction() override {} + bool RunAsync() override; private: void DidDeleteFileSystem(base::File::Error error); @@ -44,8 +44,8 @@ class SyncFileSystemGetFileStatusFunction SYNCFILESYSTEM_GETFILESYNCSTATUS) protected: - virtual ~SyncFileSystemGetFileStatusFunction() {} - virtual bool RunAsync() override; + ~SyncFileSystemGetFileStatusFunction() override {} + bool RunAsync() override; private: void DidGetFileStatus( @@ -61,8 +61,8 @@ class SyncFileSystemGetFileStatusesFunction SyncFileSystemGetFileStatusesFunction(); protected: - virtual ~SyncFileSystemGetFileStatusesFunction(); - virtual bool RunAsync() override; + ~SyncFileSystemGetFileStatusesFunction() override; + bool RunAsync() override; private: typedef std::pair<sync_file_system::SyncStatusCode, @@ -87,8 +87,8 @@ class SyncFileSystemGetUsageAndQuotaFunction SYNCFILESYSTEM_GETUSAGEANDQUOTA) protected: - virtual ~SyncFileSystemGetUsageAndQuotaFunction() {} - virtual bool RunAsync() override; + ~SyncFileSystemGetUsageAndQuotaFunction() override {} + bool RunAsync() override; private: void DidGetUsageAndQuota(storage::QuotaStatusCode status, @@ -103,8 +103,8 @@ class SyncFileSystemRequestFileSystemFunction SYNCFILESYSTEM_REQUESTFILESYSTEM) protected: - virtual ~SyncFileSystemRequestFileSystemFunction() {} - virtual bool RunAsync() override; + ~SyncFileSystemRequestFileSystemFunction() override {} + bool RunAsync() override; private: typedef SyncFileSystemRequestFileSystemFunction self; @@ -124,8 +124,8 @@ class SyncFileSystemSetConflictResolutionPolicyFunction SYNCFILESYSTEM_SETCONFLICTRESOLUTIONPOLICY) protected: - virtual ~SyncFileSystemSetConflictResolutionPolicyFunction() {} - virtual bool RunSync() override; + ~SyncFileSystemSetConflictResolutionPolicyFunction() override {} + bool RunSync() override; }; class SyncFileSystemGetConflictResolutionPolicyFunction @@ -135,8 +135,8 @@ class SyncFileSystemGetConflictResolutionPolicyFunction SYNCFILESYSTEM_GETCONFLICTRESOLUTIONPOLICY) protected: - virtual ~SyncFileSystemGetConflictResolutionPolicyFunction() {} - virtual bool RunSync() override; + ~SyncFileSystemGetConflictResolutionPolicyFunction() override {} + bool RunSync() override; }; class SyncFileSystemGetServiceStatusFunction @@ -146,8 +146,8 @@ class SyncFileSystemGetServiceStatusFunction SYNCFILESYSTEM_GETSERVICESTATUS) protected: - virtual ~SyncFileSystemGetServiceStatusFunction() {} - virtual bool RunSync() override; + ~SyncFileSystemGetServiceStatusFunction() override {} + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc b/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc index 37b5a84..bb94821 100644 --- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc +++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc @@ -40,7 +40,7 @@ class SyncFileSystemApiTest : public ExtensionApiTest { real_minimum_preserved_space_(0), real_default_quota_(0) {} - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); real_minimum_preserved_space_ = @@ -54,7 +54,7 @@ class SyncFileSystemApiTest : public ExtensionApiTest { storage::QuotaManager::kSyncableStorageDefaultHostQuota = 123456; } - virtual void TearDownInProcessBrowserTestFixture() override { + void TearDownInProcessBrowserTestFixture() override { storage::QuotaManager::kMinimumPreserveForSystem = real_minimum_preserved_space_; storage::QuotaManager::kSyncableStorageDefaultHostQuota = @@ -62,7 +62,7 @@ class SyncFileSystemApiTest : public ExtensionApiTest { ExtensionApiTest::TearDownInProcessBrowserTestFixture(); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { // Must happen after the browser process is created because instantiating // the factory will instantiate ExtensionSystemFactory which depends on // ExtensionsBrowserClient setup in BrowserProcessImpl. diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc b/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc index b51f6bd..b9a2e1e 100644 --- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc +++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc @@ -30,9 +30,9 @@ class FakeDriveServiceFactory explicit FakeDriveServiceFactory( drive::FakeDriveService::ChangeObserver* change_observer) : change_observer_(change_observer) {} - virtual ~FakeDriveServiceFactory() {} + ~FakeDriveServiceFactory() override {} - virtual scoped_ptr<drive::DriveServiceInterface> CreateDriveService( + scoped_ptr<drive::DriveServiceInterface> CreateDriveService( OAuth2TokenService* oauth2_token_service, net::URLRequestContextGetter* url_request_context_getter, base::SequencedTaskRunner* blocking_task_runner) override { @@ -59,14 +59,14 @@ class SyncFileSystemTest : public extensions::PlatformAppBrowserTest, remote_service_(NULL) { } - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); real_minimum_preserved_space_ = storage::QuotaManager::kMinimumPreserveForSystem; storage::QuotaManager::kMinimumPreserveForSystem = 0; } - virtual void TearDownInProcessBrowserTestFixture() override { + void TearDownInProcessBrowserTestFixture() override { storage::QuotaManager::kMinimumPreserveForSystem = real_minimum_preserved_space_; ExtensionApiTest::TearDownInProcessBrowserTestFixture(); @@ -81,7 +81,7 @@ class SyncFileSystemTest : public extensions::PlatformAppBrowserTest, base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ASSERT_TRUE(base_dir_.CreateUniqueTempDir()); SyncFileSystemServiceFactory* factory = @@ -116,7 +116,7 @@ class SyncFileSystemTest : public extensions::PlatformAppBrowserTest, } // drive::FakeDriveService::ChangeObserver override. - virtual void OnNewChangeAvailable() override { + void OnNewChangeAvailable() override { sync_engine()->OnNotificationReceived(); } diff --git a/chrome/browser/extensions/api/synced_notifications_private/synced_notifications_private_api.h b/chrome/browser/extensions/api/synced_notifications_private/synced_notifications_private_api.h index da92847..0e3323d 100644 --- a/chrome/browser/extensions/api/synced_notifications_private/synced_notifications_private_api.h +++ b/chrome/browser/extensions/api/synced_notifications_private/synced_notifications_private_api.h @@ -19,8 +19,8 @@ class SyncedNotificationsPrivateGetInitialDataFunction SYNCEDNOTIFICATIONSPRIVATE_GETINITIALDATA); protected: - virtual ~SyncedNotificationsPrivateGetInitialDataFunction(); - virtual ResponseAction Run() override; + ~SyncedNotificationsPrivateGetInitialDataFunction() override; + ResponseAction Run() override; private: DISALLOW_COPY_AND_ASSIGN(SyncedNotificationsPrivateGetInitialDataFunction); @@ -34,8 +34,8 @@ class SyncedNotificationsPrivateUpdateNotificationFunction SYNCEDNOTIFICATIONSPRIVATE_UPDATENOTIFICATION); protected: - virtual ~SyncedNotificationsPrivateUpdateNotificationFunction(); - virtual ResponseAction Run() override; + ~SyncedNotificationsPrivateUpdateNotificationFunction() override; + ResponseAction Run() override; private: DISALLOW_COPY_AND_ASSIGN( @@ -50,8 +50,8 @@ class SyncedNotificationsPrivateSetRenderContextFunction SYNCEDNOTIFICATIONSPRIVATE_SETRENDERCONTEXT); protected: - virtual ~SyncedNotificationsPrivateSetRenderContextFunction(); - virtual ResponseAction Run() override; + ~SyncedNotificationsPrivateSetRenderContextFunction() override; + ResponseAction Run() override; private: DISALLOW_COPY_AND_ASSIGN(SyncedNotificationsPrivateSetRenderContextFunction); diff --git a/chrome/browser/extensions/api/synced_notifications_private/synced_notifications_shim.h b/chrome/browser/extensions/api/synced_notifications_private/synced_notifications_shim.h index addbaa7..7878c79 100644 --- a/chrome/browser/extensions/api/synced_notifications_private/synced_notifications_shim.h +++ b/chrome/browser/extensions/api/synced_notifications_private/synced_notifications_shim.h @@ -25,20 +25,19 @@ class SyncedNotificationsShim : public syncer::SyncableService { explicit SyncedNotificationsShim(const EventLauncher& event_launcher, const base::Closure& refresh_request); - virtual ~SyncedNotificationsShim(); + ~SyncedNotificationsShim() override; // SyncableService interface. - virtual syncer::SyncMergeResult MergeDataAndStartSyncing( + syncer::SyncMergeResult MergeDataAndStartSyncing( syncer::ModelType type, const syncer::SyncDataList& initial_sync_data, scoped_ptr<syncer::SyncChangeProcessor> sync_processor, scoped_ptr<syncer::SyncErrorFactory> error_handler) override; - virtual void StopSyncing(syncer::ModelType type) override; - virtual syncer::SyncError ProcessSyncChanges( + void StopSyncing(syncer::ModelType type) override; + syncer::SyncError ProcessSyncChanges( const tracked_objects::Location& from_here, const syncer::SyncChangeList& change_list) override; - virtual syncer::SyncDataList GetAllSyncData( - syncer::ModelType type) const override; + syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; // JS interface methods (see synced_notifications_private.h). bool GetInitialData( diff --git a/chrome/browser/extensions/api/system_cpu/system_cpu_apitest.cc b/chrome/browser/extensions/api/system_cpu/system_cpu_apitest.cc index 2db11d4..dade8f7 100644 --- a/chrome/browser/extensions/api/system_cpu/system_cpu_apitest.cc +++ b/chrome/browser/extensions/api/system_cpu/system_cpu_apitest.cc @@ -13,7 +13,7 @@ class MockCpuInfoProviderImpl : public CpuInfoProvider { public: MockCpuInfoProviderImpl() {} - virtual bool QueryInfo() override { + bool QueryInfo() override { info_.num_of_processors = 4; info_.arch_name = "x86"; info_.model_name = "unknown"; @@ -33,7 +33,7 @@ class MockCpuInfoProviderImpl : public CpuInfoProvider { } private: - virtual ~MockCpuInfoProviderImpl() {} + ~MockCpuInfoProviderImpl() override {} }; class SystemCpuApiTest: public ExtensionApiTest { @@ -41,7 +41,7 @@ class SystemCpuApiTest: public ExtensionApiTest { SystemCpuApiTest() {} virtual ~SystemCpuApiTest() {} - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); } }; diff --git a/chrome/browser/extensions/api/system_display/system_display_apitest.cc b/chrome/browser/extensions/api/system_display/system_display_apitest.cc index 70c85c5..b91648d 100644 --- a/chrome/browser/extensions/api/system_display/system_display_apitest.cc +++ b/chrome/browser/extensions/api/system_display/system_display_apitest.cc @@ -69,42 +69,34 @@ class MockScreen : public Screen { displays_.push_back(display); } } - virtual ~MockScreen() {} + ~MockScreen() override {} protected: // Overridden from gfx::Screen: - virtual bool IsDIPEnabled() override { return true; } - virtual gfx::Point GetCursorScreenPoint() override { return gfx::Point(); } - virtual gfx::NativeWindow GetWindowUnderCursor() override { + bool IsDIPEnabled() override { return true; } + gfx::Point GetCursorScreenPoint() override { return gfx::Point(); } + gfx::NativeWindow GetWindowUnderCursor() override { return gfx::NativeWindow(); } - virtual gfx::NativeWindow GetWindowAtScreenPoint( - const gfx::Point& point) override { + gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { return gfx::NativeWindow(); } - virtual int GetNumDisplays() const override { - return displays_.size(); - } - virtual std::vector<gfx::Display> GetAllDisplays() const override { + int GetNumDisplays() const override { return displays_.size(); } + std::vector<gfx::Display> GetAllDisplays() const override { return displays_; } - virtual gfx::Display GetDisplayNearestWindow( - gfx::NativeView window) const override { + gfx::Display GetDisplayNearestWindow(gfx::NativeView window) const override { return gfx::Display(0); } - virtual gfx::Display GetDisplayNearestPoint( - const gfx::Point& point) const override { + gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override { return gfx::Display(0); } - virtual gfx::Display GetDisplayMatching( - const gfx::Rect& match_rect) const override { + gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override { return gfx::Display(0); } - virtual gfx::Display GetPrimaryDisplay() const override { - return displays_[0]; - } - virtual void AddObserver(gfx::DisplayObserver* observer) override {} - virtual void RemoveObserver(gfx::DisplayObserver* observer) override {} + gfx::Display GetPrimaryDisplay() const override { return displays_[0]; } + void AddObserver(gfx::DisplayObserver* observer) override {} + void RemoveObserver(gfx::DisplayObserver* observer) override {} private: std::vector<gfx::Display> displays_; @@ -117,12 +109,11 @@ class MockDisplayInfoProvider : public DisplayInfoProvider { public: MockDisplayInfoProvider() {} - virtual ~MockDisplayInfoProvider() {} + ~MockDisplayInfoProvider() override {} - virtual bool SetInfo( - const std::string& display_id, - const core_api::system_display::DisplayProperties& params, - std::string* error) override { + bool SetInfo(const std::string& display_id, + const core_api::system_display::DisplayProperties& params, + std::string* error) override { // Should get called only once per test case. EXPECT_FALSE(set_info_value_); set_info_value_ = params.ToValue(); @@ -130,7 +121,7 @@ class MockDisplayInfoProvider : public DisplayInfoProvider { return true; } - virtual gfx::Screen* GetActiveScreen() override { return NULL; } + gfx::Screen* GetActiveScreen() override { return NULL; } scoped_ptr<base::DictionaryValue> GetSetInfoValue() { return set_info_value_.Pass(); @@ -143,7 +134,7 @@ class MockDisplayInfoProvider : public DisplayInfoProvider { private: // Update the content of the |unit| obtained for |display| using // platform specific method. - virtual void UpdateDisplayUnitInfoForPlatform( + void UpdateDisplayUnitInfoForPlatform( const gfx::Display& display, extensions::core_api::system_display::DisplayUnitInfo* unit) override { int64 id = display.id(); @@ -177,7 +168,7 @@ class SystemDisplayApiTest: public ExtensionApiTest { virtual ~SystemDisplayApiTest() {} - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); ANNOTATE_LEAKING_OBJECT_PTR( gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)); @@ -185,7 +176,7 @@ class SystemDisplayApiTest: public ExtensionApiTest { DisplayInfoProvider::InitializeForTesting(provider_.get()); } - virtual void TearDownOnMainThread() override { + void TearDownOnMainThread() override { #if defined(OS_CHROMEOS) gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, ash::Shell::GetScreen()); diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_api.h b/chrome/browser/extensions/api/system_indicator/system_indicator_api.h index 5e50790..1fe2826 100644 --- a/chrome/browser/extensions/api/system_indicator/system_indicator_api.h +++ b/chrome/browser/extensions/api/system_indicator/system_indicator_api.h @@ -17,7 +17,7 @@ class SystemIndicatorSetIconFunction : public ExtensionActionSetIconFunction { DECLARE_EXTENSION_FUNCTION("systemIndicator.setIcon", SYSTEMINDICATOR_SETICON) protected: - virtual ~SystemIndicatorSetIconFunction() {} + ~SystemIndicatorSetIconFunction() override {} }; class SystemIndicatorEnableFunction : public ExtensionActionShowFunction { @@ -25,7 +25,7 @@ class SystemIndicatorEnableFunction : public ExtensionActionShowFunction { DECLARE_EXTENSION_FUNCTION("systemIndicator.enable", SYSTEMINDICATOR_ENABLE) protected: - virtual ~SystemIndicatorEnableFunction() {} + ~SystemIndicatorEnableFunction() override {} }; class SystemIndicatorDisableFunction : public ExtensionActionHideFunction { @@ -33,7 +33,7 @@ class SystemIndicatorDisableFunction : public ExtensionActionHideFunction { DECLARE_EXTENSION_FUNCTION("systemIndicator.disable", SYSTEMINDICATOR_DISABLE) protected: - virtual ~SystemIndicatorDisableFunction() {} + ~SystemIndicatorDisableFunction() override {} }; } // namespace extensions diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_apitest.cc b/chrome/browser/extensions/api/system_indicator/system_indicator_apitest.cc index a1d7e1c..38d7c39 100644 --- a/chrome/browser/extensions/api/system_indicator/system_indicator_apitest.cc +++ b/chrome/browser/extensions/api/system_indicator/system_indicator_apitest.cc @@ -16,7 +16,7 @@ class SystemIndicatorApiTest : public ExtensionApiTest { public: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); // Set shorter delays to prevent test timeouts in tests that need to wait // for the event page to unload. diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc b/chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc index ac56518..f358a95 100644 --- a/chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc +++ b/chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc @@ -33,13 +33,13 @@ class ExtensionIndicatorIcon : public StatusIconObserver, const ExtensionAction* action, Profile* profile, StatusTray* status_tray); - virtual ~ExtensionIndicatorIcon(); + ~ExtensionIndicatorIcon() override; // StatusIconObserver implementation. - virtual void OnStatusIconClicked() override; + void OnStatusIconClicked() override; // ExtensionActionIconFactory::Observer implementation. - virtual void OnIconUpdated() override; + void OnIconUpdated() override; private: ExtensionIndicatorIcon(const Extension* extension, diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_manager.h b/chrome/browser/extensions/api/system_indicator/system_indicator_manager.h index a542bdc..cae6f7e 100644 --- a/chrome/browser/extensions/api/system_indicator/system_indicator_manager.h +++ b/chrome/browser/extensions/api/system_indicator/system_indicator_manager.h @@ -34,22 +34,21 @@ class SystemIndicatorManager : public ExtensionRegistryObserver, public KeyedService { public: SystemIndicatorManager(Profile* profile, StatusTray* status_tray); - virtual ~SystemIndicatorManager(); + ~SystemIndicatorManager() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; private: FRIEND_TEST_ALL_PREFIXES(::SystemIndicatorApiTest, SystemIndicator); // ExtensionRegistryObserver implementation. - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // ExtensionActionAPI::Observer implementation. - virtual void OnExtensionActionUpdated( + void OnExtensionActionUpdated( ExtensionAction* extension_action, content::WebContents* web_contents, content::BrowserContext* browser_context) override; diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h b/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h index 365e5d9..12d6ac0 100644 --- a/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h +++ b/chrome/browser/extensions/api/system_indicator/system_indicator_manager_factory.h @@ -24,10 +24,10 @@ class SystemIndicatorManagerFactory : public BrowserContextKeyedServiceFactory { friend struct DefaultSingletonTraits<SystemIndicatorManagerFactory>; SystemIndicatorManagerFactory(); - virtual ~SystemIndicatorManagerFactory(); + ~SystemIndicatorManagerFactory() override; // BrowserContextKeyedBaseFactory implementation. - virtual KeyedService* BuildServiceInstanceFor( + KeyedService* BuildServiceInstanceFor( content::BrowserContext* profile) const override; }; diff --git a/chrome/browser/extensions/api/system_memory/system_memory_apitest.cc b/chrome/browser/extensions/api/system_memory/system_memory_apitest.cc index 5d0af3a..ee9b5b9 100644 --- a/chrome/browser/extensions/api/system_memory/system_memory_apitest.cc +++ b/chrome/browser/extensions/api/system_memory/system_memory_apitest.cc @@ -14,13 +14,13 @@ class MockMemoryInfoProviderImpl : public MemoryInfoProvider { public: MockMemoryInfoProviderImpl() {} - virtual bool QueryInfo() override { + bool QueryInfo() override { info_.capacity = 4096; info_.available_capacity = 1024; return true; } private: - virtual ~MockMemoryInfoProviderImpl() {} + ~MockMemoryInfoProviderImpl() override {} }; class SystemMemoryApiTest: public ExtensionApiTest { @@ -28,7 +28,7 @@ class SystemMemoryApiTest: public ExtensionApiTest { SystemMemoryApiTest() {} virtual ~SystemMemoryApiTest() {} - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); message_loop_.reset(new base::MessageLoopForUI); } diff --git a/chrome/browser/extensions/api/system_private/system_private_api.h b/chrome/browser/extensions/api/system_private/system_private_api.h index bebd362..30d2306 100644 --- a/chrome/browser/extensions/api/system_private/system_private_api.h +++ b/chrome/browser/extensions/api/system_private/system_private_api.h @@ -19,10 +19,10 @@ class SystemPrivateGetIncognitoModeAvailabilityFunction SYSTEMPRIVATE_GETINCOGNITOMODEAVAILABILITY) protected: - virtual ~SystemPrivateGetIncognitoModeAvailabilityFunction() {} + ~SystemPrivateGetIncognitoModeAvailabilityFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // API function which returns the status of system update. @@ -33,10 +33,10 @@ class SystemPrivateGetUpdateStatusFunction SYSTEMPRIVATE_GETUPDATESTATUS) protected: - virtual ~SystemPrivateGetUpdateStatusFunction() {} + ~SystemPrivateGetUpdateStatusFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // API function which returns the Google API key. @@ -45,10 +45,10 @@ class SystemPrivateGetApiKeyFunction : public SyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("systemPrivate.getApiKey", SYSTEMPRIVATE_GETAPIKEY) protected: - virtual ~SystemPrivateGetApiKeyFunction() {} + ~SystemPrivateGetApiKeyFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; // Dispatches systemPrivate.onBrightnessChanged event for extensions. diff --git a/chrome/browser/extensions/api/system_storage/system_storage_apitest.cc b/chrome/browser/extensions/api/system_storage/system_storage_apitest.cc index f5a4985..c535374 100644 --- a/chrome/browser/extensions/api/system_storage/system_storage_apitest.cc +++ b/chrome/browser/extensions/api/system_storage/system_storage_apitest.cc @@ -36,10 +36,10 @@ class TestStorageInfoProvider : public extensions::StorageInfoProvider { size_t n); private: - virtual ~TestStorageInfoProvider(); + ~TestStorageInfoProvider() override; // StorageInfoProvider implementations. - virtual double GetStorageFreeSpaceFromTransientIdOnFileThread( + double GetStorageFreeSpaceFromTransientIdOnFileThread( const std::string& transient_id) override; std::vector<struct TestStorageUnitInfo> testing_data_; @@ -71,11 +71,11 @@ class SystemStorageApiTest : public ExtensionApiTest { SystemStorageApiTest() {} virtual ~SystemStorageApiTest() {} - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { TestStorageMonitor::CreateForBrowserTests(); } - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); message_loop_.reset(new base::MessageLoopForUI); } diff --git a/chrome/browser/extensions/api/system_storage/system_storage_eject_apitest.cc b/chrome/browser/extensions/api/system_storage/system_storage_eject_apitest.cc index c2bad34..ff051f5 100644 --- a/chrome/browser/extensions/api/system_storage/system_storage_eject_apitest.cc +++ b/chrome/browser/extensions/api/system_storage/system_storage_eject_apitest.cc @@ -36,7 +36,7 @@ class SystemStorageEjectApiTest : public ExtensionApiTest { virtual ~SystemStorageEjectApiTest() {} protected: - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { monitor_ = TestStorageMonitor::CreateForBrowserTests(); ExtensionApiTest::SetUpOnMainThread(); } diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_api.h b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h index a13f1bb..2b0aea1 100644 --- a/chrome/browser/extensions/api/tab_capture/tab_capture_api.h +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h @@ -19,10 +19,10 @@ class TabCaptureCaptureFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("tabCapture.capture", TABCAPTURE_CAPTURE) protected: - virtual ~TabCaptureCaptureFunction() {} + ~TabCaptureCaptureFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class TabCaptureGetCapturedTabsFunction : public ChromeSyncExtensionFunction { @@ -31,10 +31,10 @@ class TabCaptureGetCapturedTabsFunction : public ChromeSyncExtensionFunction { TABCAPTURE_GETCAPTUREDTABS) protected: - virtual ~TabCaptureGetCapturedTabsFunction() {} + ~TabCaptureGetCapturedTabsFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_performancetest.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_performancetest.cc index 8efa51a..74d8a53 100644 --- a/chrome/browser/extensions/api/tab_capture/tab_capture_performancetest.cc +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_performancetest.cc @@ -103,7 +103,7 @@ class TabCapturePerformanceTest ExtensionApiTest::SetUp(); } - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { if (!ScalingMethod().empty()) { command_line->AppendSwitchASCII(switches::kTabCaptureUpscaleQuality, ScalingMethod()); diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc index 0ea0233..f83858a 100644 --- a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc @@ -45,7 +45,7 @@ class TabCaptureRegistry::LiveRequest : public content::WebContentsObserver { DCHECK(registry_); } - virtual ~LiveRequest() {} + ~LiveRequest() override {} // Accessors. const std::string& extension_id() const { @@ -96,25 +96,25 @@ class TabCaptureRegistry::LiveRequest : public content::WebContentsObserver { } protected: - virtual void DidShowFullscreenWidget(int routing_id) override { + void DidShowFullscreenWidget(int routing_id) override { is_fullscreened_ = true; if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) registry_->DispatchStatusChangeEvent(this); } - virtual void DidDestroyFullscreenWidget(int routing_id) override { + void DidDestroyFullscreenWidget(int routing_id) override { is_fullscreened_ = false; if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) registry_->DispatchStatusChangeEvent(this); } - virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { + void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { is_fullscreened_ = entered_fullscreen; if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) registry_->DispatchStatusChangeEvent(this); } - virtual void WebContentsDestroyed() override { + void WebContentsDestroyed() override { registry_->KillRequest(this); // Deletes |this|. } diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.h b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.h index 6ff320f..60d5f2b 100644 --- a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.h +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.h @@ -68,7 +68,7 @@ class TabCaptureRegistry : public BrowserContextKeyedAPI, class LiveRequest; explicit TabCaptureRegistry(content::BrowserContext* context); - virtual ~TabCaptureRegistry(); + ~TabCaptureRegistry() override; // Used by BrowserContextKeyedAPI. static const char* service_name() { @@ -79,17 +79,15 @@ class TabCaptureRegistry : public BrowserContextKeyedAPI, static const bool kServiceRedirectedInIncognito = true; // ExtensionRegistryObserver implementation. - virtual void OnExtensionUnloaded( - content::BrowserContext* browser_context, - const Extension* extension, - UnloadedExtensionInfo::Reason reason) override; + void OnExtensionUnloaded(content::BrowserContext* browser_context, + const Extension* extension, + UnloadedExtensionInfo::Reason reason) override; // MediaCaptureDevicesDispatcher::Observer implementation. - virtual void OnRequestUpdate( - int original_target_render_process_id, - int original_target_render_frame_id, - content::MediaStreamType stream_type, - const content::MediaRequestState state) override; + void OnRequestUpdate(int original_target_render_process_id, + int original_target_render_frame_id, + content::MediaStreamType stream_type, + const content::MediaRequestState state) override; // Send a StatusChanged event containing the current state of |request|. void DispatchStatusChangeEvent(const LiveRequest* request) const; diff --git a/chrome/browser/extensions/api/tabs/tabs_api.h b/chrome/browser/extensions/api/tabs/tabs_api.h index 099ec20..cc4216d 100644 --- a/chrome/browser/extensions/api/tabs/tabs_api.h +++ b/chrome/browser/extensions/api/tabs/tabs_api.h @@ -49,28 +49,28 @@ void ZoomModeToZoomSettings(ZoomController::ZoomMode zoom_mode, // Windows class WindowsGetFunction : public ChromeSyncExtensionFunction { - virtual ~WindowsGetFunction() {} - virtual bool RunSync() override; + ~WindowsGetFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("windows.get", WINDOWS_GET) }; class WindowsGetCurrentFunction : public ChromeSyncExtensionFunction { - virtual ~WindowsGetCurrentFunction() {} - virtual bool RunSync() override; + ~WindowsGetCurrentFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("windows.getCurrent", WINDOWS_GETCURRENT) }; class WindowsGetLastFocusedFunction : public ChromeSyncExtensionFunction { - virtual ~WindowsGetLastFocusedFunction() {} - virtual bool RunSync() override; + ~WindowsGetLastFocusedFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("windows.getLastFocused", WINDOWS_GETLASTFOCUSED) }; class WindowsGetAllFunction : public ChromeSyncExtensionFunction { - virtual ~WindowsGetAllFunction() {} - virtual bool RunSync() override; + ~WindowsGetAllFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("windows.getAll", WINDOWS_GETALL) }; class WindowsCreateFunction : public ChromeSyncExtensionFunction { - virtual ~WindowsCreateFunction() {} - virtual bool RunSync() override; + ~WindowsCreateFunction() override {} + bool RunSync() override; // Returns whether the window should be created in incognito mode. // |create_data| are the options passed by the extension. It may be NULL. // |urls| is the list of urls to open. If we are creating an incognito window, @@ -85,55 +85,55 @@ class WindowsCreateFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("windows.create", WINDOWS_CREATE) }; class WindowsUpdateFunction : public ChromeSyncExtensionFunction { - virtual ~WindowsUpdateFunction() {} - virtual bool RunSync() override; + ~WindowsUpdateFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("windows.update", WINDOWS_UPDATE) }; class WindowsRemoveFunction : public ChromeSyncExtensionFunction { - virtual ~WindowsRemoveFunction() {} - virtual bool RunSync() override; + ~WindowsRemoveFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("windows.remove", WINDOWS_REMOVE) }; // Tabs class TabsGetFunction : public ChromeSyncExtensionFunction { - virtual ~TabsGetFunction() {} - virtual bool RunSync() override; + ~TabsGetFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("tabs.get", TABS_GET) }; class TabsGetCurrentFunction : public ChromeSyncExtensionFunction { - virtual ~TabsGetCurrentFunction() {} - virtual bool RunSync() override; + ~TabsGetCurrentFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("tabs.getCurrent", TABS_GETCURRENT) }; class TabsGetSelectedFunction : public ChromeSyncExtensionFunction { - virtual ~TabsGetSelectedFunction() {} - virtual bool RunSync() override; + ~TabsGetSelectedFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("tabs.getSelected", TABS_GETSELECTED) }; class TabsGetAllInWindowFunction : public ChromeSyncExtensionFunction { - virtual ~TabsGetAllInWindowFunction() {} - virtual bool RunSync() override; + ~TabsGetAllInWindowFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("tabs.getAllInWindow", TABS_GETALLINWINDOW) }; class TabsQueryFunction : public ChromeSyncExtensionFunction { - virtual ~TabsQueryFunction() {} - virtual bool RunSync() override; + ~TabsQueryFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("tabs.query", TABS_QUERY) }; class TabsCreateFunction : public ChromeSyncExtensionFunction { - virtual ~TabsCreateFunction() {} - virtual bool RunSync() override; + ~TabsCreateFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("tabs.create", TABS_CREATE) }; class TabsDuplicateFunction : public ChromeSyncExtensionFunction { - virtual ~TabsDuplicateFunction() {} - virtual bool RunSync() override; + ~TabsDuplicateFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("tabs.duplicate", TABS_DUPLICATE) }; class TabsHighlightFunction : public ChromeSyncExtensionFunction { - virtual ~TabsHighlightFunction() {} - virtual bool RunSync() override; + ~TabsHighlightFunction() override {} + bool RunSync() override; bool HighlightTab(TabStripModel* tabstrip, ui::ListSelectionModel* selection, int *active_index, @@ -145,7 +145,7 @@ class TabsUpdateFunction : public ChromeAsyncExtensionFunction { TabsUpdateFunction(); protected: - virtual ~TabsUpdateFunction() {} + ~TabsUpdateFunction() override {} virtual bool UpdateURL(const std::string& url, int tab_id, bool* is_async); @@ -154,7 +154,7 @@ class TabsUpdateFunction : public ChromeAsyncExtensionFunction { content::WebContents* web_contents_; private: - virtual bool RunAsync() override; + bool RunAsync() override; void OnExecuteCodeFinished(const std::string& error, const GURL& on_url, const base::ListValue& script_result); @@ -162,8 +162,8 @@ class TabsUpdateFunction : public ChromeAsyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("tabs.update", TABS_UPDATE) }; class TabsMoveFunction : public ChromeSyncExtensionFunction { - virtual ~TabsMoveFunction() {} - virtual bool RunSync() override; + ~TabsMoveFunction() override {} + bool RunSync() override; bool MoveTab(int tab_id, int* new_index, int iteration, @@ -172,25 +172,25 @@ class TabsMoveFunction : public ChromeSyncExtensionFunction { DECLARE_EXTENSION_FUNCTION("tabs.move", TABS_MOVE) }; class TabsReloadFunction : public ChromeSyncExtensionFunction { - virtual ~TabsReloadFunction() {} - virtual bool RunSync() override; + ~TabsReloadFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("tabs.reload", TABS_RELOAD) }; class TabsRemoveFunction : public ChromeSyncExtensionFunction { - virtual ~TabsRemoveFunction() {} - virtual bool RunSync() override; + ~TabsRemoveFunction() override {} + bool RunSync() override; bool RemoveTab(int tab_id); DECLARE_EXTENSION_FUNCTION("tabs.remove", TABS_REMOVE) }; class TabsDetectLanguageFunction : public ChromeAsyncExtensionFunction, public content::NotificationObserver { private: - virtual ~TabsDetectLanguageFunction() {} - virtual bool RunAsync() override; + ~TabsDetectLanguageFunction() override {} + bool RunAsync() override; - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; void GotLanguage(const std::string& language); content::NotificationRegistrar registrar_; DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE) @@ -202,15 +202,15 @@ class TabsCaptureVisibleTabFunction static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); protected: - virtual ~TabsCaptureVisibleTabFunction() {} + ~TabsCaptureVisibleTabFunction() override {} private: ChromeExtensionFunctionDetails chrome_details_; // extensions::CaptureWebContentsFunction: - virtual bool IsScreenshotEnabled() override; - virtual content::WebContents* GetWebContentsForID(int id) override; - virtual void OnCaptureFailure(FailureReason reason) override; + bool IsScreenshotEnabled() override; + content::WebContents* GetWebContentsForID(int id) override; + void OnCaptureFailure(FailureReason reason) override; DECLARE_EXTENSION_FUNCTION("tabs.captureVisibleTab", TABS_CAPTUREVISIBLETAB) }; @@ -221,18 +221,18 @@ class ExecuteCodeInTabFunction : public ExecuteCodeFunction { ExecuteCodeInTabFunction(); protected: - virtual ~ExecuteCodeInTabFunction(); + ~ExecuteCodeInTabFunction() override; // ExtensionFunction: - virtual bool HasPermission() override; + bool HasPermission() override; // Initialize the |execute_tab_id_| and |details_| if they haven't already // been. Returns whether initialization was successful. - virtual bool Init() override; - virtual bool CanExecuteScriptOnPage() override; - virtual ScriptExecutor* GetScriptExecutor() override; - virtual bool IsWebView() const override; - virtual const GURL& GetWebViewSrc() const override; + bool Init() override; + bool CanExecuteScriptOnPage() override; + ScriptExecutor* GetScriptExecutor() override; + bool IsWebView() const override; + const GURL& GetWebViewSrc() const override; private: const ChromeExtensionFunctionDetails chrome_details_; @@ -243,31 +243,30 @@ class ExecuteCodeInTabFunction : public ExecuteCodeFunction { class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction { protected: - virtual bool ShouldInsertCSS() const override; + bool ShouldInsertCSS() const override; private: - virtual ~TabsExecuteScriptFunction() {} + ~TabsExecuteScriptFunction() override {} - virtual void OnExecuteCodeFinished( - const std::string& error, - const GURL& on_url, - const base::ListValue& script_result) override; + void OnExecuteCodeFinished(const std::string& error, + const GURL& on_url, + const base::ListValue& script_result) override; DECLARE_EXTENSION_FUNCTION("tabs.executeScript", TABS_EXECUTESCRIPT) }; class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { private: - virtual ~TabsInsertCSSFunction() {} + ~TabsInsertCSSFunction() override {} - virtual bool ShouldInsertCSS() const override; + bool ShouldInsertCSS() const override; DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) }; class ZoomAPIFunction : public ChromeAsyncExtensionFunction { protected: - virtual ~ZoomAPIFunction() {} + ~ZoomAPIFunction() override {} // Gets the WebContents for |tab_id| if it is specified. Otherwise get the // WebContents for the active tab in the current window. Calling this function @@ -280,36 +279,36 @@ class ZoomAPIFunction : public ChromeAsyncExtensionFunction { class TabsSetZoomFunction : public ZoomAPIFunction { private: - virtual ~TabsSetZoomFunction() {} + ~TabsSetZoomFunction() override {} - virtual bool RunAsync() override; + bool RunAsync() override; DECLARE_EXTENSION_FUNCTION("tabs.setZoom", TABS_SETZOOM) }; class TabsGetZoomFunction : public ZoomAPIFunction { private: - virtual ~TabsGetZoomFunction() {} + ~TabsGetZoomFunction() override {} - virtual bool RunAsync() override; + bool RunAsync() override; DECLARE_EXTENSION_FUNCTION("tabs.getZoom", TABS_GETZOOM) }; class TabsSetZoomSettingsFunction : public ZoomAPIFunction { private: - virtual ~TabsSetZoomSettingsFunction() {} + ~TabsSetZoomSettingsFunction() override {} - virtual bool RunAsync() override; + bool RunAsync() override; DECLARE_EXTENSION_FUNCTION("tabs.setZoomSettings", TABS_SETZOOMSETTINGS) }; class TabsGetZoomSettingsFunction : public ZoomAPIFunction { private: - virtual ~TabsGetZoomSettingsFunction() {} + ~TabsGetZoomSettingsFunction() override {} - virtual bool RunAsync() override; + bool RunAsync() override; DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) }; diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.h b/chrome/browser/extensions/api/tabs/tabs_event_router.h index eaa25c0..4926078 100644 --- a/chrome/browser/extensions/api/tabs/tabs_event_router.h +++ b/chrome/browser/extensions/api/tabs/tabs_event_router.h @@ -33,49 +33,47 @@ class TabsEventRouter : public TabStripModelObserver, public ZoomObserver { public: explicit TabsEventRouter(Profile* profile); - virtual ~TabsEventRouter(); + ~TabsEventRouter() override; // chrome::BrowserListObserver - virtual void OnBrowserAdded(Browser* browser) override; - virtual void OnBrowserRemoved(Browser* browser) override; - virtual void OnBrowserSetLastActive(Browser* browser) override; + void OnBrowserAdded(Browser* browser) override; + void OnBrowserRemoved(Browser* browser) override; + void OnBrowserSetLastActive(Browser* browser) override; // TabStripModelObserver - virtual void TabInsertedAt(content::WebContents* contents, int index, - bool active) override; - virtual void TabClosingAt(TabStripModel* tab_strip_model, - content::WebContents* contents, - int index) override; - virtual void TabDetachedAt(content::WebContents* contents, + void TabInsertedAt(content::WebContents* contents, + int index, + bool active) override; + void TabClosingAt(TabStripModel* tab_strip_model, + content::WebContents* contents, + int index) override; + void TabDetachedAt(content::WebContents* contents, int index) override; + void ActiveTabChanged(content::WebContents* old_contents, + content::WebContents* new_contents, + int index, + int reason) override; + void TabSelectionChanged(TabStripModel* tab_strip_model, + const ui::ListSelectionModel& old_model) override; + void TabMoved(content::WebContents* contents, + int from_index, + int to_index) override; + void TabChangedAt(content::WebContents* contents, + int index, + TabChangeType change_type) override; + void TabReplacedAt(TabStripModel* tab_strip_model, + content::WebContents* old_contents, + content::WebContents* new_contents, + int index) override; + void TabPinnedStateChanged(content::WebContents* contents, int index) override; - virtual void ActiveTabChanged(content::WebContents* old_contents, - content::WebContents* new_contents, - int index, - int reason) override; - virtual void TabSelectionChanged( - TabStripModel* tab_strip_model, - const ui::ListSelectionModel& old_model) override; - virtual void TabMoved(content::WebContents* contents, - int from_index, - int to_index) override; - virtual void TabChangedAt(content::WebContents* contents, - int index, - TabChangeType change_type) override; - virtual void TabReplacedAt(TabStripModel* tab_strip_model, - content::WebContents* old_contents, - content::WebContents* new_contents, - int index) override; - virtual void TabPinnedStateChanged(content::WebContents* contents, - int index) override; // content::NotificationObserver. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // ZoomObserver. - virtual void OnZoomChanged( - const ZoomController::ZoomChangedEventData& data) override; + void OnZoomChanged(const ZoomController::ZoomChangedEventData& data) override; private: // "Synthetic" event. Called from TabInsertedAt if new tab is detected. diff --git a/chrome/browser/extensions/api/tabs/tabs_test.cc b/chrome/browser/extensions/api/tabs/tabs_test.cc index 5c80e0c..286a906 100644 --- a/chrome/browser/extensions/api/tabs/tabs_test.cc +++ b/chrome/browser/extensions/api/tabs/tabs_test.cc @@ -599,7 +599,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, DuplicateTabNoPermission) { // Tester class for the tabs.zoom* api functions. class ExtensionTabsZoomTest : public ExtensionTabsTest { public: - virtual void SetUpOnMainThread() override; + void SetUpOnMainThread() override; // Runs chrome.tabs.setZoom(). bool RunSetZoom(int tab_id, double zoom_factor); diff --git a/chrome/browser/extensions/api/tabs/tabs_windows_api.h b/chrome/browser/extensions/api/tabs/tabs_windows_api.h index 72a53a1..4fe76e8 100644 --- a/chrome/browser/extensions/api/tabs/tabs_windows_api.h +++ b/chrome/browser/extensions/api/tabs/tabs_windows_api.h @@ -18,7 +18,7 @@ class TabsWindowsAPI : public BrowserContextKeyedAPI, public EventRouter::Observer { public: explicit TabsWindowsAPI(content::BrowserContext* context); - virtual ~TabsWindowsAPI(); + ~TabsWindowsAPI() override; // Convenience method to get the TabsWindowsAPI for a profile. static TabsWindowsAPI* Get(content::BrowserContext* context); @@ -27,14 +27,13 @@ class TabsWindowsAPI : public BrowserContextKeyedAPI, WindowsEventRouter* windows_event_router(); // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<TabsWindowsAPI>* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const extensions::EventListenerInfo& details) - override; + void OnListenerAdded(const extensions::EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<TabsWindowsAPI>; diff --git a/chrome/browser/extensions/api/tabs/windows_event_router.h b/chrome/browser/extensions/api/tabs/windows_event_router.h index 5bb2a1d..ce07000 100644 --- a/chrome/browser/extensions/api/tabs/windows_event_router.h +++ b/chrome/browser/extensions/api/tabs/windows_event_router.h @@ -35,13 +35,11 @@ class WindowsEventRouter : public WindowControllerListObserver, public content::NotificationObserver { public: explicit WindowsEventRouter(Profile* profile); - virtual ~WindowsEventRouter(); + ~WindowsEventRouter() override; // WindowControllerListObserver methods: - virtual void OnWindowControllerAdded( - WindowController* window_controller) override; - virtual void OnWindowControllerRemoved( - WindowController* window) override; + void OnWindowControllerAdded(WindowController* window_controller) override; + void OnWindowControllerRemoved(WindowController* window) override; #if defined(TOOLKIT_VIEWS) virtual void OnNativeFocusChange(gfx::NativeView focused_before, @@ -49,9 +47,9 @@ class WindowsEventRouter : public WindowControllerListObserver, #endif // content::NotificationObserver. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // |window_controller| is NULL to indicate a focused window has lost focus. void OnActiveWindowChanged(WindowController* window_controller); diff --git a/chrome/browser/extensions/api/top_sites/top_sites_api.h b/chrome/browser/extensions/api/top_sites/top_sites_api.h index 395cc68..41b93ef 100644 --- a/chrome/browser/extensions/api/top_sites/top_sites_api.h +++ b/chrome/browser/extensions/api/top_sites/top_sites_api.h @@ -18,10 +18,10 @@ class TopSitesGetFunction : public ChromeAsyncExtensionFunction { TopSitesGetFunction(); protected: - virtual ~TopSitesGetFunction(); + ~TopSitesGetFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnMostVisitedURLsAvailable(const history::MostVisitedURLList& data); diff --git a/chrome/browser/extensions/api/top_sites/top_sites_apitest.cc b/chrome/browser/extensions/api/top_sites/top_sites_apitest.cc index 9984623..0cb6427 100644 --- a/chrome/browser/extensions/api/top_sites/top_sites_apitest.cc +++ b/chrome/browser/extensions/api/top_sites/top_sites_apitest.cc @@ -22,7 +22,7 @@ class TopSitesExtensionTest : public InProcessBrowserTest { TopSitesExtensionTest() : top_sites_inited_(false), waiting_(false) { } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { history::TopSites* top_sites = browser()->profile()->GetTopSites(); // This may return async or sync. If sync, top_sites_inited_ will be true diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h index 8f1d6a7..2680a08 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h @@ -35,7 +35,7 @@ class WebNavigationTabObserver public content::WebContentsObserver, public content::WebContentsUserData<WebNavigationTabObserver> { public: - virtual ~WebNavigationTabObserver(); + ~WebNavigationTabObserver() override; // Returns the object for the given |web_contents|. static WebNavigationTabObserver* Get(content::WebContents* web_contents); @@ -47,49 +47,46 @@ class WebNavigationTabObserver content::RenderViewHost* GetRenderViewHostInProcess(int process_id) const; // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // content::WebContentsObserver implementation. - virtual void RenderFrameDeleted( - content::RenderFrameHost* render_frame_host) override; - virtual void RenderViewDeleted( - content::RenderViewHost* render_view_host) override; - virtual void AboutToNavigateRenderView( + void RenderFrameDeleted(content::RenderFrameHost* render_frame_host) override; + void RenderViewDeleted(content::RenderViewHost* render_view_host) override; + void AboutToNavigateRenderView( content::RenderViewHost* render_view_host) override; - virtual void DidStartProvisionalLoadForFrame( + void DidStartProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, bool is_iframe_srcdoc) override; - virtual void DidCommitProvisionalLoadForFrame( + void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, ui::PageTransition transition_type) override; - virtual void DidFailProvisionalLoad( - content::RenderFrameHost* render_frame_host, - const GURL& validated_url, - int error_code, - const base::string16& error_description) override; - virtual void DocumentLoadedInFrame( + void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host, + const GURL& validated_url, + int error_code, + const base::string16& error_description) override; + void DocumentLoadedInFrame( content::RenderFrameHost* render_frame_host) override; - virtual void DidFinishLoad(content::RenderFrameHost* render_frame_host, - const GURL& validated_url) override; - virtual void DidFailLoad(content::RenderFrameHost* render_frame_host, - const GURL& validated_url, - int error_code, - const base::string16& error_description) override; - virtual void DidGetRedirectForResourceRequest( + void DidFinishLoad(content::RenderFrameHost* render_frame_host, + const GURL& validated_url) override; + void DidFailLoad(content::RenderFrameHost* render_frame_host, + const GURL& validated_url, + int error_code, + const base::string16& error_description) override; + void DidGetRedirectForResourceRequest( content::RenderViewHost* render_view_host, const content::ResourceRedirectDetails& details) override; - virtual void DidOpenRequestedURL(content::WebContents* new_contents, - const GURL& url, - const content::Referrer& referrer, - WindowOpenDisposition disposition, - ui::PageTransition transition, - int64 source_frame_num) override; - virtual void WebContentsDestroyed() override; + void DidOpenRequestedURL(content::WebContents* new_contents, + const GURL& url, + const content::Referrer& referrer, + WindowOpenDisposition disposition, + ui::PageTransition transition, + int64 source_frame_num) override; + void WebContentsDestroyed() override; private: explicit WebNavigationTabObserver(content::WebContents* web_contents); @@ -132,7 +129,7 @@ class WebNavigationEventRouter : public TabStripModelObserver, public content::NotificationObserver { public: explicit WebNavigationEventRouter(Profile* profile); - virtual ~WebNavigationEventRouter(); + ~WebNavigationEventRouter() override; private: // Used to cache the information about newly created WebContents objects. @@ -151,19 +148,19 @@ class WebNavigationEventRouter : public TabStripModelObserver, }; // TabStripModelObserver implementation. - virtual void TabReplacedAt(TabStripModel* tab_strip_model, - content::WebContents* old_contents, - content::WebContents* new_contents, - int index) override; + void TabReplacedAt(TabStripModel* tab_strip_model, + content::WebContents* old_contents, + content::WebContents* new_contents, + int index) override; // chrome::BrowserListObserver implementation. - virtual void OnBrowserAdded(Browser* browser) override; - virtual void OnBrowserRemoved(Browser* browser) override; + void OnBrowserAdded(Browser* browser) override; + void OnBrowserRemoved(Browser* browser) override; // content::NotificationObserver implementation. - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override; // Handler for the NOTIFICATION_RETARGETING event. The method takes the // details of such an event and stores them for the later @@ -193,15 +190,15 @@ class WebNavigationEventRouter : public TabStripModelObserver, // API function that returns the state of a given frame. class WebNavigationGetFrameFunction : public ChromeSyncExtensionFunction { - virtual ~WebNavigationGetFrameFunction() {} - virtual bool RunSync() override; + ~WebNavigationGetFrameFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("webNavigation.getFrame", WEBNAVIGATION_GETFRAME) }; // API function that returns the states of all frames in a given tab. class WebNavigationGetAllFramesFunction : public ChromeSyncExtensionFunction { - virtual ~WebNavigationGetAllFramesFunction() {} - virtual bool RunSync() override; + ~WebNavigationGetAllFramesFunction() override {} + bool RunSync() override; DECLARE_EXTENSION_FUNCTION("webNavigation.getAllFrames", WEBNAVIGATION_GETALLFRAMES) }; @@ -210,17 +207,16 @@ class WebNavigationAPI : public BrowserContextKeyedAPI, public extensions::EventRouter::Observer { public: explicit WebNavigationAPI(content::BrowserContext* context); - virtual ~WebNavigationAPI(); + ~WebNavigationAPI() override; // KeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static BrowserContextKeyedAPIFactory<WebNavigationAPI>* GetFactoryInstance(); // EventRouter::Observer implementation. - virtual void OnListenerAdded(const extensions::EventListenerInfo& details) - override; + void OnListenerAdded(const extensions::EventListenerInfo& details) override; private: friend class BrowserContextKeyedAPIFactory<WebNavigationAPI>; diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc index 3fa8bd3..937e058 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc @@ -119,11 +119,9 @@ class TestNavigationListener } // content::ResourceThrottle implementation. - virtual void WillStartRequest(bool* defer) override { - *defer = true; - } + void WillStartRequest(bool* defer) override { *defer = true; } - virtual const char* GetNameForLogging() const override { + const char* GetNameForLogging() const override { return "TestNavigationListener::Throttle"; } }; @@ -163,11 +161,11 @@ class DelayLoadStartAndExecuteJavascript content::NotificationService::AllSources()); test_navigation_listener_->DelayRequestsForURL(delay_url_); } - virtual ~DelayLoadStartAndExecuteJavascript() {} + ~DelayLoadStartAndExecuteJavascript() override {} - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { if (type != chrome::NOTIFICATION_TAB_ADDED) { NOTREACHED(); return; @@ -177,7 +175,7 @@ class DelayLoadStartAndExecuteJavascript registrar_.RemoveAll(); } - virtual void DidStartProvisionalLoadForFrame( + void DidStartProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& validated_url, bool is_error_page, @@ -189,7 +187,7 @@ class DelayLoadStartAndExecuteJavascript script_was_executed_ = true; } - virtual void DidCommitProvisionalLoadForFrame( + void DidCommitProvisionalLoadForFrame( content::RenderFrameHost* render_frame_host, const GURL& url, ui::PageTransition transition_type) override { @@ -224,9 +222,9 @@ class TestResourceDispatcherHostDelegate : ChromeResourceDispatcherHostDelegate(prerender_tracker), test_navigation_listener_(test_navigation_listener) { } - virtual ~TestResourceDispatcherHostDelegate() {} + ~TestResourceDispatcherHostDelegate() override {} - virtual void RequestBeginning( + void RequestBeginning( net::URLRequest* request, content::ResourceContext* resource_context, content::AppCacheService* appcache_service, @@ -258,7 +256,7 @@ class WebNavigationApiTest : public ExtensionApiTest { WebNavigationApiTest() {} virtual ~WebNavigationApiTest() {} - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); FrameNavigationState::set_allow_extension_scheme(true); @@ -269,7 +267,7 @@ class WebNavigationApiTest : public ExtensionApiTest { host_resolver()->AddRule("*", "127.0.0.1"); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); test_navigation_listener_ = new TestNavigationListener(); resource_dispatcher_host_delegate_.reset( diff --git a/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.h b/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.h index dfe8053..2233c59 100644 --- a/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.h +++ b/chrome/browser/extensions/api/web_request/chrome_extension_web_request_event_router_delegate.h @@ -13,20 +13,20 @@ class ChromeExtensionWebRequestEventRouterDelegate : public extensions::WebRequestEventRouterDelegate { public: ChromeExtensionWebRequestEventRouterDelegate(); - virtual ~ChromeExtensionWebRequestEventRouterDelegate(); + ~ChromeExtensionWebRequestEventRouterDelegate() override; // WebRequestEventRouterDelegate implementation. - virtual void ExtractExtraRequestDetails( - net::URLRequest* request, base::DictionaryValue* out) override; - virtual bool OnGetMatchingListenersImplCheck( - int tab_id, int window_id, net::URLRequest* request) override; - virtual void LogExtensionActivity( - content::BrowserContext* browser_context, - bool is_incognito, - const std::string& extension_id, - const GURL& url, - const std::string& api_call, - scoped_ptr<base::DictionaryValue> details) override; + void ExtractExtraRequestDetails(net::URLRequest* request, + base::DictionaryValue* out) override; + bool OnGetMatchingListenersImplCheck(int tab_id, + int window_id, + net::URLRequest* request) override; + void LogExtensionActivity(content::BrowserContext* browser_context, + bool is_incognito, + const std::string& extension_id, + const GURL& url, + const std::string& api_call, + scoped_ptr<base::DictionaryValue> details) override; }; #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_CHROME_EXTENSION_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_ diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc index 867743c..0714751 100644 --- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc @@ -157,7 +157,7 @@ class TestIPCSender : public IPC::Sender { private: // IPC::Sender - virtual bool Send(IPC::Message* message) override { + bool Send(IPC::Message* message) override { EXPECT_EQ(ExtensionMsg_MessageInvoke::ID, message->type()); EXPECT_FALSE(task_queue_.empty()); diff --git a/chrome/browser/extensions/api/web_request/web_request_apitest.cc b/chrome/browser/extensions/api/web_request/web_request_apitest.cc index fdc8697..3201f0b 100644 --- a/chrome/browser/extensions/api/web_request/web_request_apitest.cc +++ b/chrome/browser/extensions/api/web_request/web_request_apitest.cc @@ -39,11 +39,11 @@ class CancelLoginDialog : public content::NotificationObserver { content::NotificationService::AllSources()); } - virtual ~CancelLoginDialog() {} + ~CancelLoginDialog() override {} - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override { + void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) override { LoginHandler* handler = content::Details<LoginNotificationDetails>(details).ptr()->handler(); handler->CancelAuth(); @@ -59,7 +59,7 @@ class CancelLoginDialog : public content::NotificationObserver { class ExtensionWebRequestApiTest : public ExtensionApiTest { public: - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); host_resolver()->AddRule("*", "127.0.0.1"); } diff --git a/chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h b/chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h index 70dfad0..823ea61 100644 --- a/chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h +++ b/chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h @@ -23,10 +23,10 @@ class ChromeWebViewInternalContextMenusCreateFunction ChromeWebViewInternalContextMenusCreateFunction() {} protected: - virtual ~ChromeWebViewInternalContextMenusCreateFunction() {} + ~ChromeWebViewInternalContextMenusCreateFunction() override {} // ExtensionFunction implementation. - virtual bool RunAsync() override; + bool RunAsync() override; private: DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalContextMenusCreateFunction); @@ -40,10 +40,10 @@ class ChromeWebViewInternalContextMenusUpdateFunction ChromeWebViewInternalContextMenusUpdateFunction() {} protected: - virtual ~ChromeWebViewInternalContextMenusUpdateFunction() {} + ~ChromeWebViewInternalContextMenusUpdateFunction() override {} // ExtensionFunction implementation. - virtual bool RunAsync() override; + bool RunAsync() override; private: DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalContextMenusUpdateFunction); @@ -57,10 +57,10 @@ class ChromeWebViewInternalContextMenusRemoveFunction ChromeWebViewInternalContextMenusRemoveFunction() {} protected: - virtual ~ChromeWebViewInternalContextMenusRemoveFunction() {} + ~ChromeWebViewInternalContextMenusRemoveFunction() override {} // ExtensionFunction implementation. - virtual bool RunAsync() override; + bool RunAsync() override; private: DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalContextMenusRemoveFunction); @@ -74,10 +74,10 @@ class ChromeWebViewInternalContextMenusRemoveAllFunction ChromeWebViewInternalContextMenusRemoveAllFunction() {} protected: - virtual ~ChromeWebViewInternalContextMenusRemoveAllFunction() {} + ~ChromeWebViewInternalContextMenusRemoveAllFunction() override {} // ExtensionFunction implementation. - virtual bool RunAsync() override; + bool RunAsync() override; private: DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalContextMenusRemoveAllFunction); @@ -92,11 +92,11 @@ class ChromeWebViewInternalShowContextMenuFunction ChromeWebViewInternalShowContextMenuFunction(); protected: - virtual ~ChromeWebViewInternalShowContextMenuFunction(); + ~ChromeWebViewInternalShowContextMenuFunction() override; private: // WebViewInternalExtensionFunction implementation. - virtual bool RunAsyncSafe(WebViewGuest* guest) override; + bool RunAsyncSafe(WebViewGuest* guest) override; DISALLOW_COPY_AND_ASSIGN(ChromeWebViewInternalShowContextMenuFunction); }; diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h index b73cb51..efc2d98 100644 --- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h +++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h @@ -26,17 +26,16 @@ class WebrtcAudioPrivateEventService public base::SystemMonitor::DevicesChangedObserver { public: explicit WebrtcAudioPrivateEventService(content::BrowserContext* context); - virtual ~WebrtcAudioPrivateEventService(); + ~WebrtcAudioPrivateEventService() override; // BrowserContextKeyedAPI implementation. - virtual void Shutdown() override; + void Shutdown() override; static BrowserContextKeyedAPIFactory<WebrtcAudioPrivateEventService>* GetFactoryInstance(); static const char* service_name(); // base::SystemMonitor::DevicesChangedObserver implementation. - virtual void OnDevicesChanged( - base::SystemMonitor::DeviceType device_type) override; + void OnDevicesChanged(base::SystemMonitor::DeviceType device_type) override; private: friend class BrowserContextKeyedAPIFactory<WebrtcAudioPrivateEventService>; @@ -51,7 +50,7 @@ class WebrtcAudioPrivateEventService class WebrtcAudioPrivateFunction : public ChromeAsyncExtensionFunction { protected: WebrtcAudioPrivateFunction(); - virtual ~WebrtcAudioPrivateFunction(); + ~WebrtcAudioPrivateFunction() override; protected: // Retrieves the list of output device names on the appropriate @@ -108,7 +107,7 @@ class WebrtcAudioPrivateFunction : public ChromeAsyncExtensionFunction { class WebrtcAudioPrivateGetSinksFunction : public WebrtcAudioPrivateFunction { protected: - virtual ~WebrtcAudioPrivateGetSinksFunction() {} + ~WebrtcAudioPrivateGetSinksFunction() override {} private: DECLARE_EXTENSION_FUNCTION("webrtcAudioPrivate.getSinks", @@ -117,9 +116,9 @@ class WebrtcAudioPrivateGetSinksFunction : public WebrtcAudioPrivateFunction { // Sequence of events is that we query the list of sinks on the // AudioManager's thread, then calculate HMACs on the IO thread, // then finish on the UI thread. - virtual bool RunAsync() override; + bool RunAsync() override; void DoQuery(); - virtual void OnOutputDeviceNames( + void OnOutputDeviceNames( scoped_ptr<media::AudioDeviceNames> raw_ids) override; void DoneOnUIThread(); }; @@ -127,17 +126,17 @@ class WebrtcAudioPrivateGetSinksFunction : public WebrtcAudioPrivateFunction { class WebrtcAudioPrivateGetActiveSinkFunction : public WebrtcAudioPrivateFunction { protected: - virtual ~WebrtcAudioPrivateGetActiveSinkFunction() {} + ~WebrtcAudioPrivateGetActiveSinkFunction() override {} private: DECLARE_EXTENSION_FUNCTION("webrtcAudioPrivate.getActiveSink", WEBRTC_AUDIO_PRIVATE_GET_ACTIVE_SINK); - virtual bool RunAsync() override; - virtual void OnControllerList( - const content::RenderViewHost::AudioOutputControllerList& - controllers) override; - virtual void OnHMACCalculated(const std::string& hmac) override; + bool RunAsync() override; + void OnControllerList( + const content::RenderViewHost::AudioOutputControllerList& controllers) + override; + void OnHMACCalculated(const std::string& hmac) override; }; class WebrtcAudioPrivateSetActiveSinkFunction @@ -146,17 +145,17 @@ class WebrtcAudioPrivateSetActiveSinkFunction WebrtcAudioPrivateSetActiveSinkFunction(); protected: - virtual ~WebrtcAudioPrivateSetActiveSinkFunction(); + ~WebrtcAudioPrivateSetActiveSinkFunction() override; private: DECLARE_EXTENSION_FUNCTION("webrtcAudioPrivate.setActiveSink", WEBRTC_AUDIO_PRIVATE_SET_ACTIVE_SINK); - virtual bool RunAsync() override; - virtual void OnControllerList( - const content::RenderViewHost::AudioOutputControllerList& - controllers) override; - virtual void OnOutputDeviceNames( + bool RunAsync() override; + void OnControllerList( + const content::RenderViewHost::AudioOutputControllerList& controllers) + override; + void OnOutputDeviceNames( scoped_ptr<media::AudioDeviceNames> device_names) override; void SwitchDone(); void DoneOnUIThread(); @@ -178,13 +177,13 @@ class WebrtcAudioPrivateGetAssociatedSinkFunction WebrtcAudioPrivateGetAssociatedSinkFunction(); protected: - virtual ~WebrtcAudioPrivateGetAssociatedSinkFunction(); + ~WebrtcAudioPrivateGetAssociatedSinkFunction() override; private: DECLARE_EXTENSION_FUNCTION("webrtcAudioPrivate.getAssociatedSink", WEBRTC_AUDIO_PRIVATE_GET_ASSOCIATED_SINK); - virtual bool RunAsync() override; + bool RunAsync() override; // This implementation is slightly complicated because of different // thread requirements for the various functions we need to invoke. @@ -215,7 +214,7 @@ class WebrtcAudioPrivateGetAssociatedSinkFunction void GetAssociatedSinkOnDeviceThread(const std::string& raw_source_id); // Receives the associated sink ID after its HMAC is calculated. - virtual void OnHMACCalculated(const std::string& hmac) override; + void OnHMACCalculated(const std::string& hmac) override; // Accessed from UI thread and device thread, but only on one at a // time, no locking needed. diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc index a5b537d..d486ac6 100644 --- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc +++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_browsertest.cc @@ -77,7 +77,7 @@ class WebrtcAudioPrivateTest : public AudioWaitingExtensionTest { : enumeration_event_(false, false) { } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { AudioWaitingExtensionTest::SetUpOnMainThread(); // Needs to happen after chrome's schemes are added. source_url_ = GURL("chrome-extension://fakeid012345678/fakepage.html"); diff --git a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.h b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.h index d8e4870..747c7ef 100644 --- a/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.h +++ b/chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.h @@ -19,7 +19,7 @@ namespace extensions { // TODO(grunell). Merge this with WebrtcAudioPrivateTabIdFunction. class WebrtcLoggingPrivateTabIdFunction : public ChromeAsyncExtensionFunction { protected: - virtual ~WebrtcLoggingPrivateTabIdFunction() {} + ~WebrtcLoggingPrivateTabIdFunction() override {} content::RenderProcessHost* RphFromTabIdAndSecurityOrigin( int tab_id, const std::string& security_origin); @@ -33,10 +33,10 @@ class WebrtcLoggingPrivateSetMetaDataFunction WebrtcLoggingPrivateSetMetaDataFunction(); private: - virtual ~WebrtcLoggingPrivateSetMetaDataFunction(); + ~WebrtcLoggingPrivateSetMetaDataFunction() override; // ExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; // Must be called on UI thread. void SetMetaDataCallback(bool success, const std::string& error_message); @@ -50,10 +50,10 @@ class WebrtcLoggingPrivateStartFunction WebrtcLoggingPrivateStartFunction(); private: - virtual ~WebrtcLoggingPrivateStartFunction(); + ~WebrtcLoggingPrivateStartFunction() override; // ExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; // Must be called on UI thread. void StartCallback(bool success, const std::string& error_message); @@ -67,10 +67,10 @@ class WebrtcLoggingPrivateSetUploadOnRenderCloseFunction WebrtcLoggingPrivateSetUploadOnRenderCloseFunction(); private: - virtual ~WebrtcLoggingPrivateSetUploadOnRenderCloseFunction(); + ~WebrtcLoggingPrivateSetUploadOnRenderCloseFunction() override; // ExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; }; class WebrtcLoggingPrivateStopFunction @@ -81,10 +81,10 @@ class WebrtcLoggingPrivateStopFunction WebrtcLoggingPrivateStopFunction(); private: - virtual ~WebrtcLoggingPrivateStopFunction(); + ~WebrtcLoggingPrivateStopFunction() override; // ExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; // Must be called on UI thread. void StopCallback(bool success, const std::string& error_message); @@ -98,10 +98,10 @@ class WebrtcLoggingPrivateUploadFunction WebrtcLoggingPrivateUploadFunction(); private: - virtual ~WebrtcLoggingPrivateUploadFunction(); + ~WebrtcLoggingPrivateUploadFunction() override; // ExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; // Must be called on UI thread. void UploadCallback(bool success, const std::string& report_id, @@ -116,10 +116,10 @@ class WebrtcLoggingPrivateDiscardFunction WebrtcLoggingPrivateDiscardFunction(); private: - virtual ~WebrtcLoggingPrivateDiscardFunction(); + ~WebrtcLoggingPrivateDiscardFunction() override; // ExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; // Must be called on UI thread. void DiscardCallback(bool success, const std::string& error_message); @@ -133,10 +133,10 @@ class WebrtcLoggingPrivateStartRtpDumpFunction WebrtcLoggingPrivateStartRtpDumpFunction(); private: - virtual ~WebrtcLoggingPrivateStartRtpDumpFunction(); + ~WebrtcLoggingPrivateStartRtpDumpFunction() override; // ExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; // Must be called on UI thread. void StartRtpDumpCallback(bool success, const std::string& error_message); @@ -150,10 +150,10 @@ class WebrtcLoggingPrivateStopRtpDumpFunction WebrtcLoggingPrivateStopRtpDumpFunction(); private: - virtual ~WebrtcLoggingPrivateStopRtpDumpFunction(); + ~WebrtcLoggingPrivateStopRtpDumpFunction() override; // ExtensionFunction overrides. - virtual bool RunAsync() override; + bool RunAsync() override; // Must be called on UI thread. void StopRtpDumpCallback(bool success, const std::string& error_message); diff --git a/chrome/browser/extensions/api/webstore/webstore_api.h b/chrome/browser/extensions/api/webstore/webstore_api.h index f5ecc50..8581026 100644 --- a/chrome/browser/extensions/api/webstore/webstore_api.h +++ b/chrome/browser/extensions/api/webstore/webstore_api.h @@ -34,7 +34,7 @@ class WebstoreAPI : public BrowserContextKeyedAPI, public InstallObserver { public: explicit WebstoreAPI(content::BrowserContext* browser_context); - virtual ~WebstoreAPI(); + ~WebstoreAPI() override; static WebstoreAPI* Get(content::BrowserContext* browser_context); @@ -76,15 +76,14 @@ class WebstoreAPI : public BrowserContextKeyedAPI, ObservedInstallInfoList* listeners); // InstallObserver implementation. - virtual void OnBeginExtensionDownload(const std::string& extension_id) - override; - virtual void OnDownloadProgress(const std::string& extension_id, - int percent_downloaded) override; - virtual void OnBeginCrxInstall(const std::string& extension_id) override; - virtual void OnShutdown() override; + void OnBeginExtensionDownload(const std::string& extension_id) override; + void OnDownloadProgress(const std::string& extension_id, + int percent_downloaded) override; + void OnBeginCrxInstall(const std::string& extension_id) override; + void OnShutdown() override; // BrowserContextKeyedService implementation. - virtual void Shutdown() override; + void Shutdown() override; // BrowserContextKeyedAPI implementation. static const char* service_name() { return "WebstoreAPI"; } diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h index 437ad3d..7bad7c7 100644 --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h @@ -54,15 +54,15 @@ class WebstorePrivateInstallBundleFunction WebstorePrivateInstallBundleFunction(); // BundleInstaller::Delegate: - virtual void OnBundleInstallApproved() override; - virtual void OnBundleInstallCanceled(bool user_initiated) override; - virtual void OnBundleInstallCompleted() override; + void OnBundleInstallApproved() override; + void OnBundleInstallCanceled(bool user_initiated) override; + void OnBundleInstallCompleted() override; protected: - virtual ~WebstorePrivateInstallBundleFunction(); + ~WebstorePrivateInstallBundleFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; // Reads the extension |details| into |items|. bool ReadBundleInfo( @@ -115,24 +115,22 @@ class WebstorePrivateBeginInstallWithManifest3Function WebstorePrivateBeginInstallWithManifest3Function(); // WebstoreInstallHelper::Delegate: - virtual void OnWebstoreParseSuccess( - const std::string& id, - const SkBitmap& icon, - base::DictionaryValue* parsed_manifest) override; - virtual void OnWebstoreParseFailure( - const std::string& id, - InstallHelperResultCode result_code, - const std::string& error_message) override; + void OnWebstoreParseSuccess(const std::string& id, + const SkBitmap& icon, + base::DictionaryValue* parsed_manifest) override; + void OnWebstoreParseFailure(const std::string& id, + InstallHelperResultCode result_code, + const std::string& error_message) override; // ExtensionInstallPrompt::Delegate: - virtual void InstallUIProceed() override; - virtual void InstallUIAbort(bool user_initiated) override; + void InstallUIProceed() override; + void InstallUIAbort(bool user_initiated) override; protected: - virtual ~WebstorePrivateBeginInstallWithManifest3Function(); + ~WebstorePrivateBeginInstallWithManifest3Function() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; // Sets the result_ as a string based on |code|. void SetResultCode(ResultCode code); @@ -171,17 +169,17 @@ class WebstorePrivateCompleteInstallFunction WebstorePrivateCompleteInstallFunction(); // WebstoreInstaller::Delegate: - virtual void OnExtensionInstallSuccess(const std::string& id) override; - virtual void OnExtensionInstallFailure( + void OnExtensionInstallSuccess(const std::string& id) override; + void OnExtensionInstallFailure( const std::string& id, const std::string& error, WebstoreInstaller::FailureReason reason) override; protected: - virtual ~WebstorePrivateCompleteInstallFunction(); + ~WebstorePrivateCompleteInstallFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: scoped_ptr<WebstoreInstaller::Approval> approval_; @@ -199,10 +197,10 @@ class WebstorePrivateEnableAppLauncherFunction WebstorePrivateEnableAppLauncherFunction(); protected: - virtual ~WebstorePrivateEnableAppLauncherFunction(); + ~WebstorePrivateEnableAppLauncherFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class WebstorePrivateGetBrowserLoginFunction @@ -212,10 +210,10 @@ class WebstorePrivateGetBrowserLoginFunction WEBSTOREPRIVATE_GETBROWSERLOGIN) protected: - virtual ~WebstorePrivateGetBrowserLoginFunction() {} + ~WebstorePrivateGetBrowserLoginFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class WebstorePrivateGetStoreLoginFunction @@ -225,10 +223,10 @@ class WebstorePrivateGetStoreLoginFunction WEBSTOREPRIVATE_GETSTORELOGIN) protected: - virtual ~WebstorePrivateGetStoreLoginFunction() {} + ~WebstorePrivateGetStoreLoginFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class WebstorePrivateSetStoreLoginFunction @@ -238,10 +236,10 @@ class WebstorePrivateSetStoreLoginFunction WEBSTOREPRIVATE_SETSTORELOGIN) protected: - virtual ~WebstorePrivateSetStoreLoginFunction() {} + ~WebstorePrivateSetStoreLoginFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class WebstorePrivateGetWebGLStatusFunction @@ -253,12 +251,12 @@ class WebstorePrivateGetWebGLStatusFunction WebstorePrivateGetWebGLStatusFunction(); protected: - virtual ~WebstorePrivateGetWebGLStatusFunction(); + ~WebstorePrivateGetWebGLStatusFunction() override; void OnFeatureCheck(bool feature_allowed); // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void CreateResult(bool webgl_allowed); @@ -275,10 +273,10 @@ class WebstorePrivateGetIsLauncherEnabledFunction WebstorePrivateGetIsLauncherEnabledFunction() {} protected: - virtual ~WebstorePrivateGetIsLauncherEnabledFunction() {} + ~WebstorePrivateGetIsLauncherEnabledFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; private: void OnIsLauncherCheckCompleted(bool is_enabled); @@ -293,10 +291,10 @@ class WebstorePrivateIsInIncognitoModeFunction WebstorePrivateIsInIncognitoModeFunction() {} protected: - virtual ~WebstorePrivateIsInIncognitoModeFunction() {} + ~WebstorePrivateIsInIncognitoModeFunction() override {} // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; class WebstorePrivateLaunchEphemeralAppFunction @@ -308,10 +306,10 @@ class WebstorePrivateLaunchEphemeralAppFunction WebstorePrivateLaunchEphemeralAppFunction(); protected: - virtual ~WebstorePrivateLaunchEphemeralAppFunction(); + ~WebstorePrivateLaunchEphemeralAppFunction() override; // ExtensionFunction: - virtual bool RunAsync() override; + bool RunAsync() override; private: void OnLaunchComplete(webstore_install::Result result, @@ -330,10 +328,10 @@ class WebstorePrivateGetEphemeralAppsEnabledFunction WebstorePrivateGetEphemeralAppsEnabledFunction(); protected: - virtual ~WebstorePrivateGetEphemeralAppsEnabledFunction(); + ~WebstorePrivateGetEphemeralAppsEnabledFunction() override; // ExtensionFunction: - virtual bool RunSync() override; + bool RunSync() override; }; } // namespace extensions diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc index 0074b70..a462e58 100644 --- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc @@ -45,7 +45,7 @@ class WebstoreInstallListener : public WebstoreInstaller::Delegate { WebstoreInstallListener() : received_failure_(false), received_success_(false), waiting_(false) {} - virtual void OnExtensionInstallSuccess(const std::string& id) override { + void OnExtensionInstallSuccess(const std::string& id) override { received_success_ = true; id_ = id; @@ -55,7 +55,7 @@ class WebstoreInstallListener : public WebstoreInstaller::Delegate { } } - virtual void OnExtensionInstallFailure( + void OnExtensionInstallFailure( const std::string& id, const std::string& error, WebstoreInstaller::FailureReason reason) override { @@ -95,14 +95,14 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest { ExtensionWebstorePrivateApiTest() {} virtual ~ExtensionWebstorePrivateApiTest() {} - virtual void SetUpCommandLine(CommandLine* command_line) override { + void SetUpCommandLine(CommandLine* command_line) override { ExtensionApiTest::SetUpCommandLine(command_line); command_line->AppendSwitchASCII( switches::kAppsGalleryURL, "http://www.example.com/files/extensions/api_test"); } - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); // Start up the test server and get us ready for calling the install @@ -112,7 +112,7 @@ class ExtensionWebstorePrivateApiTest : public ExtensionApiTest { extensions::ExtensionInstallUI::set_disable_failure_ui_for_tests(); } - virtual void SetUpOnMainThread() override { + void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); ExtensionInstallPrompt::g_auto_confirm_for_tests = @@ -398,7 +398,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstoreGetWebGLStatusTest, Blocked) { class EphemeralAppWebstorePrivateApiTest : public ExtensionWebstorePrivateApiTest { public: - virtual void SetUpInProcessBrowserTestFixture() override { + void SetUpInProcessBrowserTestFixture() override { ExtensionWebstorePrivateApiTest::SetUpInProcessBrowserTestFixture(); net::HostPortPair host_port = test_server()->host_port_pair(); @@ -410,7 +410,7 @@ class EphemeralAppWebstorePrivateApiTest switches::kAppsGalleryURL, test_gallery_url); } - virtual GURL GetTestServerURL(const std::string& path) override { + GURL GetTestServerURL(const std::string& path) override { return DoGetTestServerURL( std::string("files/extensions/platform_apps/ephemeral_launcher/") + path); |