diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 18:06:44 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-08 18:06:44 +0000 |
commit | 78994ab0a043ead9b3edb4a48c7f13cc6c2aede6 (patch) | |
tree | 357ae4e0cf8bf140e616d3086b29472043aaf0e5 /chrome/browser | |
parent | a7a265efd24072f9dc7b5f737ec84d5ae0553cd6 (diff) | |
download | chromium_src-78994ab0a043ead9b3edb4a48c7f13cc6c2aede6.zip chromium_src-78994ab0a043ead9b3edb4a48c7f13cc6c2aede6.tar.gz chromium_src-78994ab0a043ead9b3edb4a48c7f13cc6c2aede6.tar.bz2 |
Add the "virtual" keyword on method overrides that are missing it.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/5648004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
58 files changed, 280 insertions, 266 deletions
diff --git a/chrome/browser/autocomplete/history_quick_provider.h b/chrome/browser/autocomplete/history_quick_provider.h index b86ca8c..e0ed4c8 100644 --- a/chrome/browser/autocomplete/history_quick_provider.h +++ b/chrome/browser/autocomplete/history_quick_provider.h @@ -33,7 +33,7 @@ class HistoryQuickProvider : public HistoryProvider { // AutocompleteProvider. |minimal_changes| is ignored since there // is no asynch completion performed. - void Start(const AutocompleteInput& input, bool minimal_changes); + virtual void Start(const AutocompleteInput& input, bool minimal_changes); // Performs the autocomplete matching and scoring. void DoAutocomplete(); diff --git a/chrome/browser/autocomplete/keyword_provider.h b/chrome/browser/autocomplete/keyword_provider.h index e39b5b6..4a6ad90 100644 --- a/chrome/browser/autocomplete/keyword_provider.h +++ b/chrome/browser/autocomplete/keyword_provider.h @@ -126,9 +126,9 @@ class KeywordProvider : public AutocompleteProvider, void MaybeEndExtensionKeywordMode(); // NotificationObserver interface. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Model for the keywords. This is only non-null when testing, otherwise the // TemplateURLModel from the Profile is used. diff --git a/chrome/browser/autofill/credit_card.h b/chrome/browser/autofill/credit_card.h index b6fdfde..9136b5e 100644 --- a/chrome/browser/autofill/credit_card.h +++ b/chrome/browser/autofill/credit_card.h @@ -22,7 +22,7 @@ class CreditCard : public FormGroup { virtual ~CreditCard(); // FormGroup implementation: - FormGroup* Clone() const; + virtual FormGroup* Clone() const; virtual void GetPossibleFieldTypes(const string16& text, FieldTypeSet* possible_types) const; virtual void GetAvailableFieldTypes(FieldTypeSet* available_types) const; diff --git a/chrome/browser/autofill/home_address.h b/chrome/browser/autofill/home_address.h index ced2922..3984f6b 100644 --- a/chrome/browser/autofill/home_address.h +++ b/chrome/browser/autofill/home_address.h @@ -15,7 +15,7 @@ class FormGroup; class HomeAddress : public Address { public: HomeAddress() {} - FormGroup* Clone() const { return new HomeAddress(*this); } + virtual FormGroup* Clone() const { return new HomeAddress(*this); } protected: virtual AutoFillFieldType GetLine1Type() const { diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h index f6dfaae5..2411bb9 100644 --- a/chrome/browser/automation/automation_provider_observers.h +++ b/chrome/browser/automation/automation_provider_observers.h @@ -770,7 +770,7 @@ class AutomationProviderSearchEngineObserver : provider_(provider), reply_message_(reply_message) {} - void OnTemplateURLModelChanged(); + virtual void OnTemplateURLModelChanged(); private: AutomationProvider* provider_; @@ -806,10 +806,10 @@ class AutomationProviderImportSettingsObserver IPC::Message* reply_message) : provider_(provider), reply_message_(reply_message) {} - void ImportStarted() {} - void ImportItemStarted(importer::ImportItem item) {} - void ImportItemEnded(importer::ImportItem item) {} - void ImportEnded(); + virtual void ImportStarted() {} + virtual void ImportItemStarted(importer::ImportItem item) {} + virtual void ImportItemEnded(importer::ImportItem item) {} + virtual void ImportEnded(); private: AutomationProvider* provider_; IPC::Message* reply_message_; @@ -825,7 +825,7 @@ class AutomationProviderGetPasswordsObserver : provider_(provider), reply_message_(reply_message) {} - void OnPasswordStoreRequestDone( + virtual void OnPasswordStoreRequestDone( int handle, const std::vector<webkit_glue::PasswordForm*>& result); private: @@ -842,7 +842,7 @@ class AutomationProviderBrowsingDataObserver IPC::Message* reply_message) : provider_(provider), reply_message_(reply_message) {} - void OnBrowsingDataRemoverDone(); + virtual void OnBrowsingDataRemoverDone(); private: AutomationProvider* provider_; diff --git a/chrome/browser/bookmarks/bookmark_storage.h b/chrome/browser/bookmarks/bookmark_storage.h index 541b063..0bcb137 100644 --- a/chrome/browser/bookmarks/bookmark_storage.h +++ b/chrome/browser/bookmarks/bookmark_storage.h @@ -129,8 +129,9 @@ class BookmarkStorage : public NotificationObserver, void FinishHistoryMigration(); // NotificationObserver - void Observe(NotificationType type, const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Serializes the data and schedules save using ImportantFileWriter. // Returns true on successful serialization. diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h index 4cfab10..ba91c10 100644 --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h @@ -74,7 +74,7 @@ class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe { virtual void CheckForInspectorFiles(); #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) - void StartAutoupdateTimer(); + virtual void StartAutoupdateTimer(); #endif virtual bool have_inspector_files() const; diff --git a/chrome/browser/browsing_data_remover.h b/chrome/browser/browsing_data_remover.h index a160198..8249e6b 100644 --- a/chrome/browser/browsing_data_remover.h +++ b/chrome/browser/browsing_data_remover.h @@ -97,9 +97,9 @@ class BrowsingDataRemover : public NotificationObserver { // NotificationObserver method. Callback when TemplateURLModel has finished // loading. Deletes the entries from the model, and if we're not waiting on // anything else notifies observers and deletes this BrowsingDataRemover. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // If we're not waiting on anything, notifies observers and deletes this // object. diff --git a/chrome/browser/dom_ui/foreign_session_handler.h b/chrome/browser/dom_ui/foreign_session_handler.h index 6532205..8532d10 100644 --- a/chrome/browser/dom_ui/foreign_session_handler.h +++ b/chrome/browser/dom_ui/foreign_session_handler.h @@ -30,8 +30,9 @@ class ForeignSessionHandler : public DOMMessageHandler, void Init(); // Determines how ForeignSessionHandler will interact with the new tab page. - void Observe(NotificationType type, const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Returns a pointer to the current session model associator or NULL. SessionModelAssociator* GetModelAssociator(); diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h index abcd47a..40add03 100644 --- a/chrome/browser/dom_ui/new_tab_ui.h +++ b/chrome/browser/dom_ui/new_tab_ui.h @@ -89,9 +89,9 @@ class NewTabUI : public DOMUI, private: FRIEND_TEST_ALL_PREFIXES(NewTabUITest, UpdateUserPrefsVersion); - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Reset the CSS caches. void InitializeCSSCaches(); diff --git a/chrome/browser/dom_ui/options/options_ui.h b/chrome/browser/dom_ui/options/options_ui.h index fbc55e6..9d412a3 100644 --- a/chrome/browser/dom_ui/options/options_ui.h +++ b/chrome/browser/dom_ui/options/options_ui.h @@ -81,8 +81,8 @@ class OptionsUI : public DOMUI { virtual ~OptionsUI(); static RefCountedMemory* GetFaviconResourceBytes(); - void RenderViewCreated(RenderViewHost* render_view_host); - void DidBecomeActiveForReusedRenderView(); + virtual void RenderViewCreated(RenderViewHost* render_view_host); + virtual void DidBecomeActiveForReusedRenderView(); void InitializeHandlers(); diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h index 4a685e38..f27438c 100644 --- a/chrome/browser/download/download_request_limiter.h +++ b/chrome/browser/download/download_request_limiter.h @@ -131,9 +131,9 @@ class DownloadRequestLimiter private: // NotificationObserver method. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Notifies the callbacks as to whether the download is allowed or not. // Updates status_ appropriately. diff --git a/chrome/browser/extensions/extension_bookmarks_module.h b/chrome/browser/extensions/extension_bookmarks_module.h index e8e91a1..10fe373 100644 --- a/chrome/browser/extensions/extension_bookmarks_module.h +++ b/chrome/browser/extensions/extension_bookmarks_module.h @@ -179,8 +179,9 @@ class BookmarksIOFunction : public BookmarksFunction, // Overridden from SelectFileDialog::Listener: virtual void FileSelected(const FilePath& path, int index, void* params) = 0; - void MultiFilesSelected(const std::vector<FilePath>& files, void* params); - void FileSelectionCanceled(void* params); + virtual void MultiFilesSelected(const std::vector<FilePath>& files, + void* params); + virtual void FileSelectionCanceled(void* params); void SelectFile(SelectFileDialog::Type type); protected: @@ -190,8 +191,8 @@ class BookmarksIOFunction : public BookmarksFunction, class ImportBookmarksFunction : public BookmarksIOFunction { public: // Override BookmarkManagerIOFunction. - bool RunImpl(); - void FileSelected(const FilePath& path, int index, void* params); + virtual bool RunImpl(); + virtual void FileSelected(const FilePath& path, int index, void* params); private: DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.import"); @@ -200,8 +201,8 @@ class ImportBookmarksFunction : public BookmarksIOFunction { class ExportBookmarksFunction : public BookmarksIOFunction { public: // Override BookmarkManagerIOFunction. - bool RunImpl(); - void FileSelected(const FilePath& path, int index, void* params); + virtual bool RunImpl(); + virtual void FileSelected(const FilePath& path, int index, void* params); private: DECLARE_EXTENSION_FUNCTION_NAME("bookmarks.export"); diff --git a/chrome/browser/extensions/extension_browser_event_router.h b/chrome/browser/extensions/extension_browser_event_router.h index e951290..cdf2efe 100644 --- a/chrome/browser/extensions/extension_browser_event_router.h +++ b/chrome/browser/extensions/extension_browser_event_router.h @@ -92,9 +92,9 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver, Browser* browser); // NotificationObserver. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); private: // "Synthetic" event. Called from TabInsertedAt if new tab is detected. void TabCreatedAt(TabContents* contents, int index, bool foreground); diff --git a/chrome/browser/extensions/extension_message_service.h b/chrome/browser/extensions/extension_message_service.h index 9135a1c..30c771d 100644 --- a/chrome/browser/extensions/extension_message_service.h +++ b/chrome/browser/extensions/extension_message_service.h @@ -134,9 +134,9 @@ class ExtensionMessageService bool notify_other_port); // NotificationObserver interface. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // An IPC sender that might be in our list of channels has closed. void OnSenderClosed(IPC::Message::Sender* sender); diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc index 6b89f7a..14027c7 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extensions_service.cc @@ -629,6 +629,11 @@ void ExtensionsService::InitEventRouters() { event_routers_initialized_ = true; } +const Extension* ExtensionsService::GetExtensionById(const std::string& id, + bool include_disabled) { + return GetExtensionByIdInternal(id, true, include_disabled); +} + void ExtensionsService::Init() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h index d3e67438..1db154f 100644 --- a/chrome/browser/extensions/extensions_service.h +++ b/chrome/browser/extensions/extensions_service.h @@ -219,10 +219,8 @@ class ExtensionsService void InitEventRouters(); // Look up an extension by ID. - const Extension* GetExtensionById(const std::string& id, - bool include_disabled) { - return GetExtensionByIdInternal(id, true, include_disabled); - } + virtual const Extension* GetExtensionById(const std::string& id, + bool include_disabled); // Install the extension file at |extension_path|. Will install as an // update if an older version is already installed. @@ -406,7 +404,7 @@ class ExtensionsService // it. void DestroyingProfile(); - ExtensionPrefs* extension_prefs() { return extension_prefs_; } + virtual ExtensionPrefs* extension_prefs() { return extension_prefs_; } // Whether the extension service is ready. // TODO(skerner): Get rid of this method. crbug.com/63756 diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.h b/chrome/browser/extensions/sandboxed_extension_unpacker.h index 8438482..acb4081 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.h +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.h @@ -122,9 +122,9 @@ class SandboxedExtensionUnpacker : public UtilityProcessHost::Client { void StartProcessOnIOThread(const FilePath& temp_crx_path); // SandboxedExtensionUnpacker - void OnUnpackExtensionSucceeded(const DictionaryValue& manifest); - void OnUnpackExtensionFailed(const std::string& error_message); - void OnProcessCrashed(); + virtual void OnUnpackExtensionSucceeded(const DictionaryValue& manifest); + virtual void OnUnpackExtensionFailed(const std::string& error_message); + virtual void OnProcessCrashed(); void ReportFailure(const std::string& message); void ReportSuccess(); diff --git a/chrome/browser/gtk/browser_actions_toolbar_gtk.h b/chrome/browser/gtk/browser_actions_toolbar_gtk.h index ac80386..5d8b1c3 100644 --- a/chrome/browser/gtk/browser_actions_toolbar_gtk.h +++ b/chrome/browser/gtk/browser_actions_toolbar_gtk.h @@ -61,9 +61,9 @@ class BrowserActionsToolbarGtk : public ExtensionToolbarModel::Observer, void Update(); // NotificationObserver implementation. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); bool animating() { return resize_animation_.is_animating(); diff --git a/chrome/browser/gtk/browser_toolbar_gtk.h b/chrome/browser/gtk/browser_toolbar_gtk.h index 540dec1..431c573 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.h +++ b/chrome/browser/gtk/browser_toolbar_gtk.h @@ -98,9 +98,9 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver, menus::Accelerator* accelerator); // NotificationObserver implementation. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); Profile* profile() { return profile_; } void SetProfile(Profile* profile); diff --git a/chrome/browser/gtk/collected_cookies_gtk.h b/chrome/browser/gtk/collected_cookies_gtk.h index be983c3..f4348b2 100644 --- a/chrome/browser/gtk/collected_cookies_gtk.h +++ b/chrome/browser/gtk/collected_cookies_gtk.h @@ -53,9 +53,9 @@ class CollectedCookiesGtk : public ConstrainedDialogDelegate, ContentSetting setting); // Notification Observer implementation. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Callbacks. CHROMEGTK_CALLBACK_2(CollectedCookiesGtk, void, OnTreeViewRowExpanded, diff --git a/chrome/browser/gtk/options/passwords_page_gtk.h b/chrome/browser/gtk/options/passwords_page_gtk.h index 03213708..26c2ba1 100644 --- a/chrome/browser/gtk/options/passwords_page_gtk.h +++ b/chrome/browser/gtk/options/passwords_page_gtk.h @@ -38,9 +38,9 @@ class PasswordsPageGtk : public NotificationObserver { void HidePassword(); // NotificationObserver implementation. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Handles changes to the observed preferences and updates the UI. void OnPrefChanged(const std::string& pref_name); diff --git a/chrome/browser/gtk/overflow_button.h b/chrome/browser/gtk/overflow_button.h index 647221e..66724f4 100644 --- a/chrome/browser/gtk/overflow_button.h +++ b/chrome/browser/gtk/overflow_button.h @@ -24,9 +24,9 @@ class OverflowButton : public NotificationObserver { private: // NotificationObserver implementation. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); OwnedWidgetGtk widget_; diff --git a/chrome/browser/gtk/slide_animator_gtk.h b/chrome/browser/gtk/slide_animator_gtk.h index dabdd70..8028367 100644 --- a/chrome/browser/gtk/slide_animator_gtk.h +++ b/chrome/browser/gtk/slide_animator_gtk.h @@ -83,8 +83,8 @@ class SlideAnimatorGtk : public AnimationDelegate { bool IsAnimating(); // AnimationDelegate implementation. - void AnimationProgressed(const Animation* animation); - void AnimationEnded(const Animation* animation); + virtual void AnimationProgressed(const Animation* animation); + virtual void AnimationEnded(const Animation* animation); // Used during testing; disable or enable animations (default is enabled). static void SetAnimationsForTesting(bool enable); diff --git a/chrome/browser/gtk/status_bubble_gtk.h b/chrome/browser/gtk/status_bubble_gtk.h index 48354ed..82253d4 100644 --- a/chrome/browser/gtk/status_bubble_gtk.h +++ b/chrome/browser/gtk/status_bubble_gtk.h @@ -55,9 +55,9 @@ class StatusBubbleGtk : public StatusBubble, virtual void UpdateDownloadShelfVisibility(bool visible); // Overridden from NotificationObserver: - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Top of the widget hierarchy for a StatusBubble. This top level widget is // guarenteed to have its gtk_widget_name set to "status-bubble" for diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h index 54cbf29..b8c27d6 100644 --- a/chrome/browser/history/history_backend.h +++ b/chrome/browser/history/history_backend.h @@ -453,8 +453,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>, // Schedules a broadcast of the given notification on the main thread. The // details argument will have ownership taken by this function (it will be // sent to the main thread and deleted there). - void BroadcastNotifications(NotificationType type, - HistoryDetails* details_deleted); + virtual void BroadcastNotifications(NotificationType type, + HistoryDetails* details_deleted); // Deleting all history ------------------------------------------------------ diff --git a/chrome/browser/importer/importer.h b/chrome/browser/importer/importer.h index d8cecac..7c527fa 100644 --- a/chrome/browser/importer/importer.h +++ b/chrome/browser/importer/importer.h @@ -109,9 +109,9 @@ class ImporterHost : public base::RefCountedThreadSafe<ImporterHost>, // NotificationObserver implementation. Called when TemplateURLModel has been // loaded. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // ShowWarningDialog() asks user to close the application that is owning the // lock. They can retry or skip the importing process. diff --git a/chrome/browser/parsers/metadata_parser_filebase.h b/chrome/browser/parsers/metadata_parser_filebase.h index 9ed5775..e1614a8 100644 --- a/chrome/browser/parsers/metadata_parser_filebase.h +++ b/chrome/browser/parsers/metadata_parser_filebase.h @@ -27,7 +27,7 @@ class FileMetadataParser : public MetadataParser { virtual bool Parse(); virtual bool GetProperty(const std::string& key, std::string* value); - MetadataPropertyIterator* GetPropertyIterator(); + virtual MetadataPropertyIterator* GetPropertyIterator(); protected: PropertyMap properties_; diff --git a/chrome/browser/password_manager/password_store_default.h b/chrome/browser/password_manager/password_store_default.h index 38c7440..6652958 100644 --- a/chrome/browser/password_manager/password_store_default.h +++ b/chrome/browser/password_manager/password_store_default.h @@ -27,26 +27,26 @@ class PasswordStoreDefault : public PasswordStore, virtual ~PasswordStoreDefault(); // Implements PasswordStore interface. - void ReportMetricsImpl(); - void AddLoginImpl(const webkit_glue::PasswordForm& form); - void UpdateLoginImpl(const webkit_glue::PasswordForm& form); - void RemoveLoginImpl(const webkit_glue::PasswordForm& form); - void RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin, - const base::Time& delete_end); - void GetLoginsImpl(GetLoginsRequest* request, - const webkit_glue::PasswordForm& form); - void GetAutofillableLoginsImpl(GetLoginsRequest* request); - void GetBlacklistLoginsImpl(GetLoginsRequest* request); - bool FillAutofillableLogins( + virtual void ReportMetricsImpl(); + virtual void AddLoginImpl(const webkit_glue::PasswordForm& form); + virtual void UpdateLoginImpl(const webkit_glue::PasswordForm& form); + virtual void RemoveLoginImpl(const webkit_glue::PasswordForm& form); + virtual void RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin, + const base::Time& delete_end); + virtual void GetLoginsImpl(GetLoginsRequest* request, + const webkit_glue::PasswordForm& form); + virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request); + virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request); + virtual bool FillAutofillableLogins( std::vector<webkit_glue::PasswordForm*>* forms); - bool FillBlacklistLogins( + virtual bool FillBlacklistLogins( std::vector<webkit_glue::PasswordForm*>* forms); scoped_refptr<WebDataService> web_data_service_; // Implements the WebDataService consumer interface. - void OnWebDataServiceRequestDone(WebDataService::Handle handle, - const WDTypedResult *result); + virtual void OnWebDataServiceRequestDone(WebDataService::Handle handle, + const WDTypedResult *result); protected: inline bool DeleteAndRecreateDatabaseFile() { diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h index 3857c73..ac5b326 100644 --- a/chrome/browser/plugin_process_host.h +++ b/chrome/browser/plugin_process_host.h @@ -66,7 +66,7 @@ class PluginProcessHost : public BrowserChildProcessHost, bool Init(const WebPluginInfo& info, const std::string& locale); // Force the plugin process to shutdown (cleanly). - void ForceShutdown(); + virtual void ForceShutdown(); virtual void OnMessageReceived(const IPC::Message& msg); virtual void OnChannelConnected(int32 peer_pid); diff --git a/chrome/browser/plugin_updater.h b/chrome/browser/plugin_updater.h index 78a3cd6..ecdd1d5 100644 --- a/chrome/browser/plugin_updater.h +++ b/chrome/browser/plugin_updater.h @@ -41,9 +41,9 @@ class PluginUpdater : public NotificationObserver { void UpdatePreferences(Profile* profile, int delay_ms); // NotificationObserver method overrides - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); static PluginUpdater* GetPluginUpdater(); diff --git a/chrome/browser/policy/device_management_policy_provider.h b/chrome/browser/policy/device_management_policy_provider.h index c7cdcbc..a3a61d1 100644 --- a/chrome/browser/policy/device_management_policy_provider.h +++ b/chrome/browser/policy/device_management_policy_provider.h @@ -48,9 +48,9 @@ class DeviceManagementPolicyProvider virtual void OnError(DeviceManagementBackend::ErrorCode code); // DeviceTokenFetcher::Observer implementation: - void OnTokenSuccess(); - void OnTokenError(); - void OnNotManaged(); + virtual void OnTokenSuccess(); + virtual void OnTokenError(); + virtual void OnNotManaged(); // True if a policy request has been sent to the device management backend // server and no response or error has yet been received. diff --git a/chrome/browser/policy/file_based_policy_provider.h b/chrome/browser/policy/file_based_policy_provider.h index a554699..7b1807a 100644 --- a/chrome/browser/policy/file_based_policy_provider.h +++ b/chrome/browser/policy/file_based_policy_provider.h @@ -106,8 +106,8 @@ class FileBasedPolicyLoader : public FilePathWatcher::Delegate { const FilePath& config_file_path() { return delegate_->config_file_path(); } // FilePathWatcher::Delegate implementation: - void OnFilePathChanged(const FilePath& path); - void OnError(); + virtual void OnFilePathChanged(const FilePath& path); + virtual void OnError(); private: // FileBasedPolicyLoader objects should only be deleted by diff --git a/chrome/browser/profile_import_process_host.h b/chrome/browser/profile_import_process_host.h index a9d5805..a6129a1 100644 --- a/chrome/browser/profile_import_process_host.h +++ b/chrome/browser/profile_import_process_host.h @@ -123,7 +123,7 @@ class ProfileImportProcessHost : public BrowserChildProcessHost { // Called by the external importer process to send messages back to the // ImportProcessClient. - void OnMessageReceived(const IPC::Message& message); + virtual void OnMessageReceived(const IPC::Message& message); // Overridden from BrowserChildProcessHost: virtual void OnProcessCrashed(); diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h index 0696d25..d46c900 100644 --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h @@ -68,8 +68,8 @@ class ProfileManager : public NonThreadSafe, const_iterator end() const { return profiles_.end(); } // PowerObserver notifications - void OnSuspend(); - void OnResume(); + virtual void OnSuspend(); + virtual void OnResume(); // NotificationObserver implementation. virtual void Observe(NotificationType type, diff --git a/chrome/browser/renderer_host/async_resource_handler.h b/chrome/browser/renderer_host/async_resource_handler.h index be89d87..0e62936 100644 --- a/chrome/browser/renderer_host/async_resource_handler.h +++ b/chrome/browser/renderer_host/async_resource_handler.h @@ -26,24 +26,24 @@ class AsyncResourceHandler : public ResourceHandler { ResourceDispatcherHost* resource_dispatcher_host); // ResourceHandler implementation: - bool OnUploadProgress(int request_id, uint64 position, uint64 size); - bool OnRequestRedirected(int request_id, const GURL& new_url, - ResourceResponse* response, bool* defer); - bool OnResponseStarted(int request_id, ResourceResponse* response); - bool OnWillStart(int request_id, const GURL& url, bool* defer); - bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, - int min_size); - bool OnReadCompleted(int request_id, int* bytes_read); - bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, - const std::string& security_info); - void OnRequestClosed(); - void OnDataDownloaded(int request_id, int bytes_downloaded); + virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); + virtual bool OnRequestRedirected(int request_id, const GURL& new_url, + ResourceResponse* response, bool* defer); + virtual bool OnResponseStarted(int request_id, ResourceResponse* response); + virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); + virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, + int min_size); + virtual bool OnReadCompleted(int request_id, int* bytes_read); + virtual bool OnResponseCompleted(int request_id, + const URLRequestStatus& status, + const std::string& security_info); + virtual void OnRequestClosed(); + virtual void OnDataDownloaded(int request_id, int bytes_downloaded); static void GlobalCleanup(); private: - ~AsyncResourceHandler(); + virtual ~AsyncResourceHandler(); scoped_refptr<SharedIOBuffer> read_buffer_; ResourceDispatcherHost::Receiver* receiver_; diff --git a/chrome/browser/renderer_host/download_resource_handler.h b/chrome/browser/renderer_host/download_resource_handler.h index 95c09da2..3fb6961 100644 --- a/chrome/browser/renderer_host/download_resource_handler.h +++ b/chrome/browser/renderer_host/download_resource_handler.h @@ -34,29 +34,29 @@ class DownloadResourceHandler : public ResourceHandler { bool save_as, const DownloadSaveInfo& save_info); - bool OnUploadProgress(int request_id, uint64 position, uint64 size); + virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); // Not needed, as this event handler ought to be the final resource. - bool OnRequestRedirected(int request_id, const GURL& url, - ResourceResponse* response, bool* defer); + virtual bool OnRequestRedirected(int request_id, const GURL& url, + ResourceResponse* response, bool* defer); // Send the download creation information to the download thread. - bool OnResponseStarted(int request_id, ResourceResponse* response); + virtual bool OnResponseStarted(int request_id, ResourceResponse* response); // Pass-through implementation. - bool OnWillStart(int request_id, const GURL& url, bool* defer); + virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); // Create a new buffer, which will be handed to the download thread for file // writing and deletion. - bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, - int min_size); + virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, + int min_size); - bool OnReadCompleted(int request_id, int* bytes_read); + virtual bool OnReadCompleted(int request_id, int* bytes_read); - bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, - const std::string& security_info); - void OnRequestClosed(); + virtual bool OnResponseCompleted(int request_id, + const URLRequestStatus& status, + const std::string& security_info); + virtual void OnRequestClosed(); // If the content-length header is not present (or contains something other // than numbers), the incoming content_length is -1 (unknown size). diff --git a/chrome/browser/renderer_host/redirect_to_file_resource_handler.h b/chrome/browser/renderer_host/redirect_to_file_resource_handler.h index 4929711..5e8624a 100644 --- a/chrome/browser/renderer_host/redirect_to_file_resource_handler.h +++ b/chrome/browser/renderer_host/redirect_to_file_resource_handler.h @@ -35,18 +35,18 @@ class RedirectToFileResourceHandler : public ResourceHandler { ResourceDispatcherHost* resource_dispatcher_host); // ResourceHandler implementation: - bool OnUploadProgress(int request_id, uint64 position, uint64 size); - bool OnRequestRedirected(int request_id, const GURL& new_url, - ResourceResponse* response, bool* defer); - bool OnResponseStarted(int request_id, ResourceResponse* response); - bool OnWillStart(int request_id, const GURL& url, bool* defer); - bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, - int min_size); - bool OnReadCompleted(int request_id, int* bytes_read); - bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, - const std::string& security_info); - void OnRequestClosed(); + virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); + virtual bool OnRequestRedirected(int request_id, const GURL& new_url, + ResourceResponse* response, bool* defer); + virtual bool OnResponseStarted(int request_id, ResourceResponse* response); + virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); + virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, + int min_size); + virtual bool OnReadCompleted(int request_id, int* bytes_read); + virtual bool OnResponseCompleted(int request_id, + const URLRequestStatus& status, + const std::string& security_info); + virtual void OnRequestClosed(); private: virtual ~RedirectToFileResourceHandler(); diff --git a/chrome/browser/renderer_host/render_widget_host.h b/chrome/browser/renderer_host/render_widget_host.h index b29b95f..45b114b 100644 --- a/chrome/browser/renderer_host/render_widget_host.h +++ b/chrome/browser/renderer_host/render_widget_host.h @@ -183,7 +183,7 @@ class RenderWidgetHost : public IPC::Channel::Listener, virtual void OnMessageReceived(const IPC::Message& msg); // Sends a message to the corresponding object in the renderer. - bool Send(IPC::Message* msg); + virtual bool Send(IPC::Message* msg); // Called to notify the RenderWidget that it has been hidden or restored from // having been hidden. diff --git a/chrome/browser/renderer_host/safe_browsing_resource_handler.h b/chrome/browser/renderer_host/safe_browsing_resource_handler.h index 14ddd4b..1386935 100644 --- a/chrome/browser/renderer_host/safe_browsing_resource_handler.h +++ b/chrome/browser/renderer_host/safe_browsing_resource_handler.h @@ -52,32 +52,32 @@ class SafeBrowsingResourceHandler : public ResourceHandler, ResourceDispatcherHost::Receiver* receiver); // ResourceHandler implementation: - bool OnUploadProgress(int request_id, uint64 position, uint64 size); - bool OnRequestRedirected(int request_id, const GURL& new_url, - ResourceResponse* response, bool* defer); - bool OnResponseStarted(int request_id, ResourceResponse* response); - bool OnWillStart(int request_id, const GURL& url, bool* defer); - bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, - int min_size); - bool OnReadCompleted(int request_id, int* bytes_read); - bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, - const std::string& security_info); + virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); + virtual bool OnRequestRedirected(int request_id, const GURL& new_url, + ResourceResponse* response, bool* defer); + virtual bool OnResponseStarted(int request_id, ResourceResponse* response); + virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); + virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, + int min_size); + virtual bool OnReadCompleted(int request_id, int* bytes_read); + virtual bool OnResponseCompleted(int request_id, + const URLRequestStatus& status, + const std::string& security_info); virtual void OnRequestClosed(); // SafeBrowsingService::Client implementation, called on the IO thread once // the URL has been classified. - void OnUrlCheckResult(const GURL& url, - SafeBrowsingService::UrlCheckResult result); + virtual void OnUrlCheckResult(const GURL& url, + SafeBrowsingService::UrlCheckResult result); // SafeBrowsingService::Client implementation, called on the IO thread when // the user has decided to proceed with the current request, or go back. - void OnBlockingPageComplete(bool proceed); + virtual void OnBlockingPageComplete(bool proceed); // NotificationObserver interface. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); private: // Describes what phase of the check a handler is in. diff --git a/chrome/browser/renderer_host/site_instance.h b/chrome/browser/renderer_host/site_instance.h index df7f69c..edb377f 100644 --- a/chrome/browser/renderer_host/site_instance.h +++ b/chrome/browser/renderer_host/site_instance.h @@ -161,9 +161,9 @@ class SiteInstance : public base::RefCounted<SiteInstance>, private: // NotificationObserver implementation. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); NotificationRegistrar registrar_; diff --git a/chrome/browser/renderer_host/sync_resource_handler.h b/chrome/browser/renderer_host/sync_resource_handler.h index 6f86de7..81c4a9a 100644 --- a/chrome/browser/renderer_host/sync_resource_handler.h +++ b/chrome/browser/renderer_host/sync_resource_handler.h @@ -26,18 +26,18 @@ class SyncResourceHandler : public ResourceHandler { IPC::Message* result_message, ResourceDispatcherHost* resource_dispatcher_host); - bool OnUploadProgress(int request_id, uint64 position, uint64 size); - bool OnRequestRedirected(int request_id, const GURL& new_url, - ResourceResponse* response, bool* defer); - bool OnResponseStarted(int request_id, ResourceResponse* response); - bool OnWillStart(int request_id, const GURL& url, bool* defer); - bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, - int min_size); - bool OnReadCompleted(int request_id, int* bytes_read); - bool OnResponseCompleted(int request_id, - const URLRequestStatus& status, - const std::string& security_info); - void OnRequestClosed(); + virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); + virtual bool OnRequestRedirected(int request_id, const GURL& new_url, + ResourceResponse* response, bool* defer); + virtual bool OnResponseStarted(int request_id, ResourceResponse* response); + virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); + virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, + int min_size); + virtual bool OnReadCompleted(int request_id, int* bytes_read); + virtual bool OnResponseCompleted(int request_id, + const URLRequestStatus& status, + const std::string& security_info); + virtual void OnRequestClosed(); private: enum { kReadBufSize = 3840 }; diff --git a/chrome/browser/renderer_host/x509_user_cert_resource_handler.h b/chrome/browser/renderer_host/x509_user_cert_resource_handler.h index 54b481d..8ae25f8 100644 --- a/chrome/browser/renderer_host/x509_user_cert_resource_handler.h +++ b/chrome/browser/renderer_host/x509_user_cert_resource_handler.h @@ -30,34 +30,34 @@ class X509UserCertResourceHandler : public ResourceHandler { net::URLRequest* request, int render_process_host_id, int render_view_id); - bool OnUploadProgress(int request_id, uint64 position, uint64 size); + virtual bool OnUploadProgress(int request_id, uint64 position, uint64 size); // Not needed, as this event handler ought to be the final resource. - bool OnRequestRedirected(int request_id, const GURL& url, - ResourceResponse* resp, bool* defer); + virtual bool OnRequestRedirected(int request_id, const GURL& url, + ResourceResponse* resp, bool* defer); // Check if this indeed an X509 cert. - bool OnResponseStarted(int request_id, ResourceResponse* resp); + virtual bool OnResponseStarted(int request_id, ResourceResponse* resp); // Pass-through implementation. - bool OnWillStart(int request_id, const GURL& url, bool* defer); + virtual bool OnWillStart(int request_id, const GURL& url, bool* defer); // Create a new buffer to store received data. - bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, - int min_size); + virtual bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size, + int min_size); // A read was completed, maybe allocate a new buffer for further data. - bool OnReadCompleted(int request_id, int* bytes_read); + virtual bool OnReadCompleted(int request_id, int* bytes_read); // Done downloading the certificate. - bool OnResponseCompleted(int request_id, - const URLRequestStatus& urs, - const std::string& sec_info); + virtual bool OnResponseCompleted(int request_id, + const URLRequestStatus& urs, + const std::string& sec_info); - void OnRequestClosed(); + virtual void OnRequestClosed(); private: - ~X509UserCertResourceHandler(); + virtual ~X509UserCertResourceHandler(); void AssembleResource(); diff --git a/chrome/browser/repost_form_warning_controller.h b/chrome/browser/repost_form_warning_controller.h index fb8cf28..e6aef10 100644 --- a/chrome/browser/repost_form_warning_controller.h +++ b/chrome/browser/repost_form_warning_controller.h @@ -32,9 +32,9 @@ class RepostFormWarningController : public NotificationObserver { private: // NotificationObserver implementation. // Watch for a new load or a closed tab and dismiss the dialog if they occur. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Close the warning dialog. void CloseDialog(); diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h index 2b51734..f17b77a 100644 --- a/chrome/browser/sessions/session_service.h +++ b/chrome/browser/sessions/session_service.h @@ -347,7 +347,7 @@ class SessionService : public BaseSessionService, // Schedules the specified command. This method takes ownership of the // command. - void ScheduleCommand(SessionCommand* command); + virtual void ScheduleCommand(SessionCommand* command); // Converts all pending tab/window closes to commands and schedules them. void CommitPendingCloses(); diff --git a/chrome/browser/speech/speech_input_dispatcher_host.h b/chrome/browser/speech/speech_input_dispatcher_host.h index 85ca5c0..987bd57 100644 --- a/chrome/browser/speech/speech_input_dispatcher_host.h +++ b/chrome/browser/speech/speech_input_dispatcher_host.h @@ -23,10 +23,10 @@ class SpeechInputDispatcherHost explicit SpeechInputDispatcherHost(int resource_message_filter_process_id); // SpeechInputManager::Delegate methods. - void SetRecognitionResult(int caller_id, - const SpeechInputResultArray& result); - void DidCompleteRecording(int caller_id); - void DidCompleteRecognition(int caller_id); + virtual void SetRecognitionResult(int caller_id, + const SpeechInputResultArray& result); + virtual void DidCompleteRecording(int caller_id); + virtual void DidCompleteRecognition(int caller_id); // Called to possibly handle the incoming IPC message. Returns true if // handled. diff --git a/chrome/browser/speech/speech_recognition_request.h b/chrome/browser/speech/speech_recognition_request.h index 585b0a4..d6e9566 100644 --- a/chrome/browser/speech/speech_recognition_request.h +++ b/chrome/browser/speech/speech_recognition_request.h @@ -53,12 +53,12 @@ class SpeechRecognitionRequest : public URLFetcher::Delegate { bool HasPendingRequest() { return url_fetcher_ != NULL; } // URLFetcher::Delegate methods. - void OnURLFetchComplete(const URLFetcher* source, - const GURL& url, - const URLRequestStatus& status, - int response_code, - const ResponseCookies& cookies, - const std::string& data); + virtual void OnURLFetchComplete(const URLFetcher* source, + const GURL& url, + const URLRequestStatus& status, + int response_code, + const ResponseCookies& cookies, + const std::string& data); private: scoped_refptr<URLRequestContextGetter> url_context_; diff --git a/chrome/browser/speech/speech_recognizer.h b/chrome/browser/speech/speech_recognizer.h index 3b0f707..cafba28 100644 --- a/chrome/browser/speech/speech_recognizer.h +++ b/chrome/browser/speech/speech_recognizer.h @@ -94,14 +94,16 @@ class SpeechRecognizer void CancelRecognition(); // AudioInputController::EventHandler methods. - void OnCreated(media::AudioInputController* controller) { } - void OnRecording(media::AudioInputController* controller) { } - void OnError(media::AudioInputController* controller, int error_code); - void OnData(media::AudioInputController* controller, const uint8* data, - uint32 size); + virtual void OnCreated(media::AudioInputController* controller) { } + virtual void OnRecording(media::AudioInputController* controller) { } + virtual void OnError(media::AudioInputController* controller, int error_code); + virtual void OnData(media::AudioInputController* controller, + const uint8* data, + uint32 size); // SpeechRecognitionRequest::Delegate methods. - void SetRecognitionResult(bool error, const SpeechInputResultArray& result); + virtual void SetRecognitionResult(bool error, + const SpeechInputResultArray& result); static const int kAudioSampleRate; static const int kAudioPacketIntervalMs; // Duration of each audio packet. diff --git a/chrome/browser/sync/glue/database_model_worker.h b/chrome/browser/sync/glue/database_model_worker.h index a10e2de..5b3a6997 100644 --- a/chrome/browser/sync/glue/database_model_worker.h +++ b/chrome/browser/sync/glue/database_model_worker.h @@ -22,7 +22,7 @@ class DatabaseModelWorker : public browser_sync::ModelSafeWorker { explicit DatabaseModelWorker() {} // ModelSafeWorker implementation. Called on syncapi SyncerThread. - void DoWorkAndWaitUntilDone(Callback0::Type* work); + virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_DB; } virtual bool CurrentThreadIsWorkThread(); diff --git a/chrome/browser/sync/glue/history_model_worker.h b/chrome/browser/sync/glue/history_model_worker.h index 4afeead..32d45dc 100644 --- a/chrome/browser/sync/glue/history_model_worker.h +++ b/chrome/browser/sync/glue/history_model_worker.h @@ -30,7 +30,7 @@ class HistoryModelWorker : public browser_sync::ModelSafeWorker, virtual ~HistoryModelWorker(); // ModelSafeWorker implementation. Called on syncapi SyncerThread. - void DoWorkAndWaitUntilDone(Callback0::Type* work); + virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_HISTORY; } virtual bool CurrentThreadIsWorkThread(); diff --git a/chrome/browser/sync/glue/password_model_worker.h b/chrome/browser/sync/glue/password_model_worker.h index cd16874..d88a456 100644 --- a/chrome/browser/sync/glue/password_model_worker.h +++ b/chrome/browser/sync/glue/password_model_worker.h @@ -29,7 +29,7 @@ class PasswordModelWorker : public browser_sync::ModelSafeWorker { virtual ~PasswordModelWorker(); // ModelSafeWorker implementation. Called on syncapi SyncerThread. - void DoWorkAndWaitUntilDone(Callback0::Type* work); + virtual void DoWorkAndWaitUntilDone(Callback0::Type* work); virtual ModelSafeGroup GetModelSafeGroup() { return GROUP_PASSWORD; } virtual bool CurrentThreadIsWorkThread(); diff --git a/chrome/browser/task_manager/task_manager.h b/chrome/browser/task_manager/task_manager.h index 5b33c75..bd8ac5f 100644 --- a/chrome/browser/task_manager/task_manager.h +++ b/chrome/browser/task_manager/task_manager.h @@ -297,13 +297,16 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, const Extension* GetResourceExtension(int index) const; // JobObserver methods: - void OnJobAdded(net::URLRequestJob* job); - void OnJobRemoved(net::URLRequestJob* job); - void OnJobDone(net::URLRequestJob* job, const URLRequestStatus& status); - void OnJobRedirect(net::URLRequestJob* job, - const GURL& location, - int status_code); - void OnBytesRead(net::URLRequestJob* job, const char* buf, int byte_count); + virtual void OnJobAdded(net::URLRequestJob* job); + virtual void OnJobRemoved(net::URLRequestJob* job); + virtual void OnJobDone(net::URLRequestJob* job, + const URLRequestStatus& status); + virtual void OnJobRedirect(net::URLRequestJob* job, + const GURL& location, + int status_code); + virtual void OnBytesRead(net::URLRequestJob* job, + const char* buf, + int byte_count); void AddResourceProvider(TaskManager::ResourceProvider* provider); void RemoveResourceProvider(TaskManager::ResourceProvider* provider); diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc index e7b76e6..e4cc078 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.cc +++ b/chrome/browser/task_manager/task_manager_resource_providers.cc @@ -684,6 +684,14 @@ TaskManager::Resource::Type TaskManagerChildProcessResource::GetType() const { } } +bool TaskManagerChildProcessResource::SupportNetworkUsage() const { + return network_usage_support_; +} + +void TaskManagerChildProcessResource::SetSupportNetworkUsage() { + network_usage_support_ = true; +} + //////////////////////////////////////////////////////////////////////////////// // TaskManagerChildProcessResourceProvider class //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/task_manager/task_manager_resource_providers.h b/chrome/browser/task_manager/task_manager_resource_providers.h index 4c61b34..cf29bc2 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.h +++ b/chrome/browser/task_manager/task_manager_resource_providers.h @@ -35,7 +35,7 @@ class TaskManagerRendererResource : public TaskManager::Resource { virtual ~TaskManagerRendererResource(); // TaskManager::Resource methods: - base::ProcessHandle GetProcess() const; + virtual base::ProcessHandle GetProcess() const; virtual Type GetType() const { return RENDERER; } virtual bool ReportsCacheStats() const { return true; } virtual WebKit::WebCache::ResourceTypeStats GetWebCoreCacheStats() const; @@ -44,8 +44,8 @@ class TaskManagerRendererResource : public TaskManager::Resource { virtual size_t GetV8MemoryUsed() const; // RenderResources always provide the network usage. - bool SupportNetworkUsage() const { return true; } - void SetSupportNetworkUsage() { } + virtual bool SupportNetworkUsage() const { return true; } + virtual void SetSupportNetworkUsage() { } virtual void Refresh(); @@ -78,7 +78,7 @@ class TaskManagerRendererResource : public TaskManager::Resource { class TaskManagerTabContentsResource : public TaskManagerRendererResource { public: explicit TaskManagerTabContentsResource(TabContents* tab_contents); - ~TaskManagerTabContentsResource(); + virtual ~TaskManagerTabContentsResource(); // TaskManager::Resource methods: virtual Type GetType() const; @@ -140,7 +140,7 @@ class TaskManagerBackgroundContentsResource TaskManagerBackgroundContentsResource( BackgroundContents* background_contents, const std::wstring& application_name); - ~TaskManagerBackgroundContentsResource(); + virtual ~TaskManagerBackgroundContentsResource(); // TaskManager::Resource methods: virtual std::wstring GetTitle() const; @@ -208,21 +208,15 @@ class TaskManagerBackgroundContentsResourceProvider class TaskManagerChildProcessResource : public TaskManager::Resource { public: explicit TaskManagerChildProcessResource(const ChildProcessInfo& child_proc); - ~TaskManagerChildProcessResource(); + virtual ~TaskManagerChildProcessResource(); // TaskManagerResource methods: - std::wstring GetTitle() const; - SkBitmap GetIcon() const; - base::ProcessHandle GetProcess() const; - Type GetType() const; - - bool SupportNetworkUsage() const { - return network_usage_support_; - } - - void SetSupportNetworkUsage() { - network_usage_support_ = true; - } + virtual std::wstring GetTitle() const; + virtual SkBitmap GetIcon() const; + virtual base::ProcessHandle GetProcess() const; + virtual Type GetType() const; + virtual bool SupportNetworkUsage() const; + virtual void SetSupportNetworkUsage(); // Returns the pid of the child process. int process_id() const { return pid_; } @@ -298,22 +292,23 @@ class TaskManagerChildProcessResourceProvider class TaskManagerExtensionProcessResource : public TaskManager::Resource { public: explicit TaskManagerExtensionProcessResource(ExtensionHost* extension_host); - ~TaskManagerExtensionProcessResource(); + virtual ~TaskManagerExtensionProcessResource(); // TaskManagerResource methods: - std::wstring GetTitle() const; - SkBitmap GetIcon() const; - base::ProcessHandle GetProcess() const; - Type GetType() const { return EXTENSION; } - bool SupportNetworkUsage() const { return true; } - void SetSupportNetworkUsage() { NOTREACHED(); } - const Extension* GetExtension() const; + virtual std::wstring GetTitle() const; + virtual SkBitmap GetIcon() const; + virtual base::ProcessHandle GetProcess() const; + virtual Type GetType() const { return EXTENSION; } + virtual bool SupportNetworkUsage() const { return true; } + virtual void SetSupportNetworkUsage() { NOTREACHED(); } + virtual const Extension* GetExtension() const; // Returns the pid of the extension process. int process_id() const { return pid_; } // Returns true if the associated extension has a background page. - bool IsBackground() const; + virtual bool IsBackground() const; + private: // The icon painted for the extension process. static SkBitmap* default_icon_; @@ -372,13 +367,13 @@ class TaskManagerExtensionProcessResourceProvider class TaskManagerNotificationResource : public TaskManager::Resource { public: explicit TaskManagerNotificationResource(BalloonHost* balloon_host); - ~TaskManagerNotificationResource(); + virtual ~TaskManagerNotificationResource(); // TaskManager::Resource interface - std::wstring GetTitle() const { return title_; } - SkBitmap GetIcon() const; - base::ProcessHandle GetProcess() const; - Type GetType() const { return NOTIFICATION; } + virtual std::wstring GetTitle() const { return title_; } + virtual SkBitmap GetIcon() const; + virtual base::ProcessHandle GetProcess() const; + virtual Type GetType() const { return NOTIFICATION; } virtual bool SupportNetworkUsage() const { return false; } virtual void SetSupportNetworkUsage() { } @@ -437,19 +432,19 @@ class TaskManagerNotificationResourceProvider class TaskManagerBrowserProcessResource : public TaskManager::Resource { public: TaskManagerBrowserProcessResource(); - ~TaskManagerBrowserProcessResource(); + virtual ~TaskManagerBrowserProcessResource(); // TaskManagerResource methods: - std::wstring GetTitle() const; - SkBitmap GetIcon() const; - base::ProcessHandle GetProcess() const; - Type GetType() const { return BROWSER; } + virtual std::wstring GetTitle() const; + virtual SkBitmap GetIcon() const; + virtual base::ProcessHandle GetProcess() const; + virtual Type GetType() const { return BROWSER; } - bool SupportNetworkUsage() const { return true; } - void SetSupportNetworkUsage() { NOTREACHED(); } + virtual bool SupportNetworkUsage() const { return true; } + virtual void SetSupportNetworkUsage() { NOTREACHED(); } - bool ReportsSqliteMemoryUsed() const { return true; } - size_t SqliteMemoryUsedBytes() const; + virtual bool ReportsSqliteMemoryUsed() const { return true; } + virtual size_t SqliteMemoryUsedBytes() const; // Returns the pid of the browser process. int process_id() const { return pid_; } diff --git a/chrome/browser/ui/views/notifications/balloon_view.h b/chrome/browser/ui/views/notifications/balloon_view.h index 7372c84..c4e7efd 100644 --- a/chrome/browser/ui/views/notifications/balloon_view.h +++ b/chrome/browser/ui/views/notifications/balloon_view.h @@ -72,11 +72,11 @@ class BalloonViewImpl : public BalloonView, } // views::ViewMenuDelegate interface. - void RunMenu(views::View* source, const gfx::Point& pt); + virtual void RunMenu(views::View* source, const gfx::Point& pt); // views::WidgetDelegate interface. - void DisplayChanged(); - void WorkAreaChanged(); + virtual void DisplayChanged(); + virtual void WorkAreaChanged(); // views::ButtonListener interface. virtual void ButtonPressed(views::Button* sender, const views::Event&); diff --git a/chrome/browser/utility_process_host.h b/chrome/browser/utility_process_host.h index 48d5e38..555ef44 100644 --- a/chrome/browser/utility_process_host.h +++ b/chrome/browser/utility_process_host.h @@ -150,7 +150,7 @@ class UtilityProcessHost : public BrowserChildProcessHost { bool StartProcess(const FilePath& exposed_dir); // IPC messages: - void OnMessageReceived(const IPC::Message& message); + virtual void OnMessageReceived(const IPC::Message& message); // BrowserChildProcessHost: virtual void OnProcessCrashed(); diff --git a/chrome/browser/worker_host/message_port_dispatcher.h b/chrome/browser/worker_host/message_port_dispatcher.h index 566416b..4c71283 100644 --- a/chrome/browser/worker_host/message_port_dispatcher.h +++ b/chrome/browser/worker_host/message_port_dispatcher.h @@ -66,9 +66,9 @@ class MessagePortDispatcher : public NotificationObserver { const std::vector<int>& sent_message_port_ids); // NotificationObserver interface. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Handles the details of removing a message port id. Before calling this, // verify that the message port id exists. diff --git a/chrome/browser/worker_host/worker_service.h b/chrome/browser/worker_host/worker_service.h index 744f116..994d11f 100644 --- a/chrome/browser/worker_host/worker_service.h +++ b/chrome/browser/worker_host/worker_service.h @@ -142,9 +142,9 @@ class WorkerService : public NotificationObserver { int renderer_id, int render_view_route_id, bool* hit_total_worker_limit); // NotificationObserver interface. - void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(NotificationType type, + const NotificationSource& source, + const NotificationDetails& details); // Notifies us that a process that's talking to a worker has shut down. void SenderShutdown(IPC::Message::Sender* sender); |