diff options
154 files changed, 832 insertions, 832 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_model.cc b/chrome/browser/autocomplete/autocomplete_popup_model.cc index 6b4384e..e7c143c 100644 --- a/chrome/browser/autocomplete/autocomplete_popup_model.cc +++ b/chrome/browser/autocomplete/autocomplete_popup_model.cc @@ -12,7 +12,7 @@ #include "chrome/browser/autocomplete/autocomplete_popup_view.h" #include "chrome/browser/autocomplete/search_provider.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_model.h" #include "chrome/common/notification_service.h" @@ -224,11 +224,11 @@ bool AutocompletePopupModel::GetKeywordForMatch(const AutocompleteMatch& match, // Don't provide a hint for inactive/disabled extension keywords. if (template_url->IsExtensionKeyword()) { - const Extension* extension = profile_->GetExtensionsService()-> + const Extension* extension = profile_->GetExtensionService()-> GetExtensionById(template_url->GetExtensionId(), false); if (!extension || (profile_->IsOffTheRecord() && - !profile_->GetExtensionsService()->IsIncognitoEnabled(extension))) + !profile_->GetExtensionService()->IsIncognitoEnabled(extension))) return false; } @@ -322,6 +322,6 @@ const SkBitmap* AutocompletePopupModel::GetSpecialIconForMatch( if (!match.template_url || !match.template_url->IsExtensionKeyword()) return NULL; - return &profile_->GetExtensionsService()->GetOmniboxPopupIcon( + return &profile_->GetExtensionService()->GetOmniboxPopupIcon( match.template_url->GetExtensionId()); } diff --git a/chrome/browser/autocomplete/keyword_provider.cc b/chrome/browser/autocomplete/keyword_provider.cc index fd3607e..6bea041 100644 --- a/chrome/browser/autocomplete/keyword_provider.cc +++ b/chrome/browser/autocomplete/keyword_provider.cc @@ -12,7 +12,7 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/autocomplete/autocomplete_match.h" #include "chrome/browser/extensions/extension_omnibox_api.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_model.h" @@ -182,7 +182,7 @@ void KeywordProvider::Start(const AutocompleteInput& input, const TemplateURL* template_url(model->GetTemplateURLForKeyword(*i)); if (profile_ && !input.synchronous_only() && template_url->IsExtensionKeyword()) { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); const Extension* extension = service->GetExtensionById( template_url->GetExtensionId(), false); bool enabled = extension && (!profile_->IsOffTheRecord() || diff --git a/chrome/browser/automation/automation_extension_tracker.cc b/chrome/browser/automation/automation_extension_tracker.cc index 6a567fa..18a480d 100644 --- a/chrome/browser/automation/automation_extension_tracker.cc +++ b/chrome/browser/automation/automation_extension_tracker.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "chrome/browser/automation/automation_extension_tracker.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/notification_service.h" @@ -34,7 +34,7 @@ void AutomationExtensionTracker::Observe(NotificationType type, const Extension* extension = Details<const Extension>(details).ptr(); Profile* profile = Source<Profile>(source).ptr(); if (profile) { - ExtensionsService* service = profile->GetExtensionsService(); + ExtensionService* service = profile->GetExtensionService(); if (service) { // Remove this extension only if it is uninstalled, not just disabled. // If it is being uninstalled, the extension will not be in the regular diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index ff81396..aa68824 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -58,7 +58,7 @@ #include "chrome/browser/extensions/extension_message_service.h" #include "chrome/browser/extensions/extension_tabs_module.h" #include "chrome/browser/extensions/extension_toolbar_model.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/importer/importer.h" #include "chrome/browser/importer/importer_data_types.h" @@ -308,7 +308,7 @@ const Extension* AutomationProvider::GetExtension(int extension_handle) { const Extension* AutomationProvider::GetEnabledExtension(int extension_handle) { const Extension* extension = extension_tracker_->GetResource(extension_handle); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (extension && service && service->GetExtensionById(extension->id(), false)) return extension; @@ -319,7 +319,7 @@ const Extension* AutomationProvider::GetDisabledExtension( int extension_handle) { const Extension* extension = extension_tracker_->GetResource(extension_handle); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (extension && service && service->GetExtensionById(extension->id(), true) && !service->GetExtensionById(extension->id(), false)) @@ -754,7 +754,7 @@ RenderViewHost* AutomationProvider::GetViewForTab(int tab_handle) { void AutomationProvider::InstallExtension(const FilePath& crx_path, IPC::Message* reply_message) { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (service) { // The observer will delete itself when done. new ExtensionInstallNotificationObserver(this, @@ -774,14 +774,14 @@ void AutomationProvider::InstallExtension(const FilePath& crx_path, void AutomationProvider::LoadExpandedExtension( const FilePath& extension_dir, IPC::Message* reply_message) { - if (profile_->GetExtensionsService()) { + if (profile_->GetExtensionService()) { // The observer will delete itself when done. new ExtensionInstallNotificationObserver( this, AutomationMsg_LoadExpandedExtension::ID, reply_message); - profile_->GetExtensionsService()->LoadExtension(extension_dir); + profile_->GetExtensionService()->LoadExtension(extension_dir); } else { AutomationMsg_LoadExpandedExtension::WriteReplyParams( reply_message, AUTOMATION_MSG_EXTENSION_INSTALL_FAILED); @@ -791,7 +791,7 @@ void AutomationProvider::LoadExpandedExtension( void AutomationProvider::GetEnabledExtensions( std::vector<FilePath>* result) { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); DCHECK(service); if (service->extensions_enabled()) { const ExtensionList* extensions = service->extensions(); @@ -818,7 +818,7 @@ void AutomationProvider::WaitForExtensionTestResult( void AutomationProvider::InstallExtensionAndGetHandle( const FilePath& crx_path, bool with_ui, IPC::Message* reply_message) { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); ExtensionProcessManager* manager = profile_->GetExtensionProcessManager(); if (service && manager) { // The observer will delete itself when done. @@ -843,7 +843,7 @@ void AutomationProvider::UninstallExtension(int extension_handle, bool* success) { *success = false; const Extension* extension = GetExtension(extension_handle); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (extension && service) { ExtensionUnloadNotificationObserver observer; service->UninstallExtension(extension->id(), false); @@ -856,7 +856,7 @@ void AutomationProvider::UninstallExtension(int extension_handle, void AutomationProvider::EnableExtension(int extension_handle, IPC::Message* reply_message) { const Extension* extension = GetDisabledExtension(extension_handle); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); ExtensionProcessManager* manager = profile_->GetExtensionProcessManager(); // Only enable if this extension is disabled. if (extension && service && manager) { @@ -877,7 +877,7 @@ void AutomationProvider::DisableExtension(int extension_handle, bool* success) { *success = false; const Extension* extension = GetEnabledExtension(extension_handle); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (extension && service) { ExtensionUnloadNotificationObserver observer; service->DisableExtension(extension->id()); @@ -892,7 +892,7 @@ void AutomationProvider::ExecuteExtensionActionInActiveTabAsync( IPC::Message* reply_message) { bool success = false; const Extension* extension = GetEnabledExtension(extension_handle); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); ExtensionMessageService* message_service = profile_->GetExtensionMessageService(); Browser* browser = browser_tracker_->GetResource(browser_handle); @@ -917,7 +917,7 @@ void AutomationProvider::MoveExtensionBrowserAction( int extension_handle, int index, bool* success) { *success = false; const Extension* extension = GetEnabledExtension(extension_handle); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (extension && service) { ExtensionToolbarModel* toolbar = service->toolbar_model(); if (toolbar) { @@ -938,7 +938,7 @@ void AutomationProvider::GetExtensionProperty( std::string* value) { *success = false; const Extension* extension = GetExtension(extension_handle); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (extension && service) { ExtensionToolbarModel* toolbar = service->toolbar_model(); int found_index = -1; diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 96c52ec..c6570da 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -37,7 +37,7 @@ #include "chrome/browser/download/download_prefs.h" #include "chrome/browser/download/download_shelf.h" #include "chrome/browser/extensions/extension_host.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/history/top_sites.h" #include "chrome/browser/importer/importer.h" #include "chrome/browser/notifications/balloon.h" @@ -3690,7 +3690,7 @@ void TestingAutomationProvider::GetExtensionsInfo( DictionaryValue* args, IPC::Message* reply_message) { AutomationJSONReply reply(this, reply_message); - ExtensionsService* service = profile()->GetExtensionsService(); + ExtensionService* service = profile()->GetExtensionService(); if (!service) { reply.SendError("No extensions service."); } @@ -3729,7 +3729,7 @@ void TestingAutomationProvider::UninstallExtensionById( reply.SendError("Must include string id."); return; } - ExtensionsService* service = profile()->GetExtensionsService(); + ExtensionService* service = profile()->GetExtensionService(); if (!service) { reply.SendError("No extensions service."); return; diff --git a/chrome/browser/background_application_list_model.cc b/chrome/browser/background_application_list_model.cc index 3d78c4a..09ec5a6 100644 --- a/chrome/browser/background_application_list_model.cc +++ b/chrome/browser/background_application_list_model.cc @@ -12,7 +12,7 @@ #include "chrome/browser/background_mode_manager.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extension_prefs.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/image_loading_tracker.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" @@ -67,7 +67,7 @@ class BackgroundApplicationListModel::Application }; namespace { -void GetServiceApplications(ExtensionsService* service, +void GetServiceApplications(ExtensionService* service, ExtensionList* applications_result) { const ExtensionList* extensions = service->extensions(); @@ -239,7 +239,7 @@ void BackgroundApplicationListModel::Observe( Update(); return; } - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (!service || !service->is_ready()) return; @@ -286,7 +286,7 @@ void BackgroundApplicationListModel::RemoveObserver(Observer* observer) { // differs from the old list, it generates OnApplicationListChanged events for // each observer. void BackgroundApplicationListModel::Update() { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); // Discover current background applications, compare with previous list, which // is consistently sorted, and notify observers if they differ. diff --git a/chrome/browser/background_application_list_model.h b/chrome/browser/background_application_list_model.h index 0c2163d..8f42164 100644 --- a/chrome/browser/background_application_list_model.h +++ b/chrome/browser/background_application_list_model.h @@ -15,7 +15,7 @@ #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" -class ExtensionsService; +class ExtensionService; class PrefService; class Profile; diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc index 9ac692f..9236800 100644 --- a/chrome/browser/background_contents_service.cc +++ b/chrome/browser/background_contents_service.cc @@ -9,7 +9,7 @@ #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "base/values.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" @@ -132,7 +132,7 @@ void BackgroundContentsService::LoadBackgroundContentsFromPrefs( prefs_->GetDictionary(prefs::kRegisteredBackgroundContents); if (!contents) return; - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); DCHECK(extensions_service); for (DictionaryValue::key_iterator it = contents->begin_keys(); it != contents->end_keys(); ++it) { diff --git a/chrome/browser/background_mode_manager.cc b/chrome/browser/background_mode_manager.cc index 0b427e6..290eed9 100644 --- a/chrome/browser/background_mode_manager.cc +++ b/chrome/browser/background_mode_manager.cc @@ -12,7 +12,7 @@ #include "chrome/browser/background_application_list_model.h" #include "chrome/browser/background_mode_manager.h" #include "chrome/browser/browser_list.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/background_page_tracker.cc b/chrome/browser/background_page_tracker.cc index 75fe3c9b..faf12f6 100644 --- a/chrome/browser/background_page_tracker.cc +++ b/chrome/browser/background_page_tracker.cc @@ -13,7 +13,7 @@ #include "chrome/browser/background_contents_service.h" #include "chrome/browser/background_mode_manager.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" @@ -109,8 +109,8 @@ BackgroundPageTracker::BackgroundPageTracker() { // Check to make sure all of the extensions are loaded - once they are loaded // we can update the list. Profile* profile = g_browser_process->profile_manager()->GetDefaultProfile(); - if (profile->GetExtensionsService() && - profile->GetExtensionsService()->is_ready()) { + if (profile->GetExtensionService() && + profile->GetExtensionService()->is_ready()) { UpdateExtensionList(); // We do not send any change notifications here, because the object was // just created (it doesn't seem appropriate to send a change notification @@ -177,7 +177,7 @@ void BackgroundPageTracker::Observe(NotificationType type, bool BackgroundPageTracker::UpdateExtensionList() { // Extensions are loaded - update our list. Profile* profile = g_browser_process->profile_manager()->GetDefaultProfile(); - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); DCHECK(extensions_service); // We will make two passes to update the list: diff --git a/chrome/browser/browser_browsertest.cc b/chrome/browser/browser_browsertest.cc index a6bd3e4..ae52bac 100644 --- a/chrome/browser/browser_browsertest.cc +++ b/chrome/browser/browser_browsertest.cc @@ -12,7 +12,7 @@ #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/defaults.h" #include "chrome/browser/extensions/extension_browsertest.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" @@ -161,7 +161,7 @@ class BrowserTest : public ExtensionBrowserTest { // Returns the app extension aptly named "App Test". const Extension* GetExtension() { const ExtensionList* extensions = - browser()->profile()->GetExtensionsService()->extensions(); + browser()->profile()->GetExtensionService()->extensions(); for (size_t i = 0; i < extensions->size(); ++i) { if ((*extensions)[i]->name() == "App Test") return (*extensions)[i]; @@ -481,7 +481,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, TabClosingWhenRemovingExtension) { model->AddObserver(&observer); // Uninstall the extension and make sure TabClosing is sent. - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); service->UninstallExtension(GetExtension()->id(), false); EXPECT_EQ(1, observer.closing_count()); diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 103e5be..8958872 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -42,7 +42,7 @@ #include "chrome/browser/browser_thread.h" #include "chrome/browser/dom_ui/chrome_url_data_manager.h" #include "chrome/browser/extensions/extension_protocols.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extensions_startup.h" #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/jankometer.h" @@ -1567,10 +1567,10 @@ int BrowserMain(const MainFunctionParams& parameters) { // Initialize extension event routers. Note that on Chrome OS, this will // not succeed if the user has not logged in yet, in which case the // event routers are initialized in LoginUtilsImpl::CompleteLogin instead. - if (profile->GetExtensionsService()) { + if (profile->GetExtensionService()) { // This will initialize bookmarks. Call it after bookmark import is done. // See issue 40144. - profile->GetExtensionsService()->InitEventRouters(); + profile->GetExtensionService()->InitEventRouters(); } // The extension service may be available at this point. If the command line diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc index a4d10fd..9efbd99 100644 --- a/chrome/browser/browsing_data_remover.cc +++ b/chrome/browser/browsing_data_remover.cc @@ -11,7 +11,7 @@ #include "chrome/browser/autofill/personal_data_manager.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/download/download_manager.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/history/history.h" #include "chrome/browser/in_process_webkit/webkit_context.h" #include "chrome/browser/profiles/profile.h" @@ -100,7 +100,7 @@ void BrowsingDataRemover::Remove(int remove_mask) { removing_ = true; std::vector<GURL> origin_whitelist; - ExtensionsService* extensions_service = profile_->GetExtensionsService(); + ExtensionService* extensions_service = profile_->GetExtensionService(); if (extensions_service && extensions_service->HasInstalledExtensions()) { std::map<GURL, int> whitelist_map = extensions_service->protected_storage_map(); diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc index 69a7e86..fa76953 100644 --- a/chrome/browser/chromeos/login/login_browsertest.cc +++ b/chrome/browser/chromeos/login/login_browsertest.cc @@ -93,7 +93,7 @@ IN_PROC_BROWSER_TEST_F(LoginProfileTest, UserNotPassed) { EXPECT_EQ("Default", profile->GetPath().BaseName().value()); EXPECT_TRUE(profile->IsOffTheRecord()); // Ensure there's no extension service for this profile. - EXPECT_EQ(NULL, profile->GetExtensionsService()); + EXPECT_EQ(NULL, profile->GetExtensionService()); } } // namespace chromeos diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc index 8c7b81c..4a771db 100644 --- a/chrome/browser/chromeos/login/login_utils.cc +++ b/chrome/browser/chromeos/login/login_utils.cc @@ -31,7 +31,7 @@ #include "chrome/browser/chromeos/login/user_image_downloader.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/chromeos/proxy_config_service.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/net/gaia/token_service.h" #include "chrome/browser/net/preconnect.h" @@ -247,9 +247,9 @@ void LoginUtilsImpl::CompleteLogin( // Init extension event routers; this normally happens in browser_main // but on Chrome OS it has to be deferred until the user finishes // logging in and the profile is not OTR. - if (profile->GetExtensionsService() && - profile->GetExtensionsService()->extensions_enabled()) { - profile->GetExtensionsService()->InitEventRouters(); + if (profile->GetExtensionService() && + profile->GetExtensionService()->extensions_enabled()) { + profile->GetExtensionService()->InitEventRouters(); } btl->AddLoginTimeMarker("ExtensionsServiceStarted", false); diff --git a/chrome/browser/chromeos/offline/offline_load_page.cc b/chrome/browser/chromeos/offline/offline_load_page.cc index f97c018..420ddea 100644 --- a/chrome/browser/chromeos/offline/offline_load_page.cc +++ b/chrome/browser/chromeos/offline/offline_load_page.cc @@ -14,7 +14,7 @@ #include "base/values.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_thread.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/browser/tab_contents/navigation_entry.h" @@ -108,7 +108,7 @@ std::string OfflineLoadPage::GetHTMLContents() { Profile* profile = tab()->profile(); DCHECK(profile); const Extension* extension = NULL; - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); // Extension service does not exist in test. if (extensions_service) extension = extensions_service->GetExtensionByWebExtent(url()); diff --git a/chrome/browser/cookies_tree_model.cc b/chrome/browser/cookies_tree_model.cc index ed3c8b4..78a873c 100644 --- a/chrome/browser/cookies_tree_model.cc +++ b/chrome/browser/cookies_tree_model.cc @@ -14,7 +14,7 @@ #include "base/linked_ptr.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/in_process_webkit/webkit_context.h" #include "grit/app_resources.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc index a536427..458be02 100644 --- a/chrome/browser/debugger/devtools_sanity_unittest.cc +++ b/chrome/browser/debugger/devtools_sanity_unittest.cc @@ -10,7 +10,7 @@ #include "chrome/browser/debugger/devtools_manager.h" #include "chrome/browser/debugger/devtools_window.h" #include "chrome/browser/extensions/extension_host.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -189,7 +189,7 @@ class DevToolsExtensionDebugTest : public DevToolsSanityTest, private: bool LoadExtensionFromPath(const FilePath& path) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); size_t num_before = service->extensions()->size(); { NotificationRegistrar registrar; diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index bef546d..697f00a 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -12,7 +12,7 @@ #include "chrome/browser/browser_window.h" #include "chrome/browser/debugger/devtools_manager.h" #include "chrome/browser/debugger/devtools_window.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/in_process_webkit/session_storage_namespace.h" #include "chrome/browser/load_notification_details.h" #include "chrome/browser/prefs/pref_service.h" @@ -274,9 +274,9 @@ void DevToolsWindow::AddDevToolsExtensionsToClient() { CallClientFunction(L"WebInspector.setInspectedTabId", tabId); } ListValue results; - const ExtensionsService* extension_service = + const ExtensionService* extension_service = tab_contents_->tab_contents()->profile()-> - GetOriginalProfile()->GetExtensionsService(); + GetOriginalProfile()->GetExtensionService(); const ExtensionList* extensions = extension_service->extensions(); for (ExtensionList::const_iterator extension = extensions->begin(); diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc index 333b77d..ec9aa965 100644 --- a/chrome/browser/dom_ui/app_launcher_handler.cc +++ b/chrome/browser/dom_ui/app_launcher_handler.cc @@ -14,7 +14,7 @@ #include "chrome/browser/app_launched_animation.h" #include "chrome/browser/extensions/default_apps.h" #include "chrome/browser/extensions/extension_prefs.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/platform_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -73,7 +73,7 @@ bool IsPromoActive(const std::string& path) { } // namespace -AppLauncherHandler::AppLauncherHandler(ExtensionsService* extension_service) +AppLauncherHandler::AppLauncherHandler(ExtensionService* extension_service) : extensions_service_(extension_service), promo_active_(false) { } diff --git a/chrome/browser/dom_ui/app_launcher_handler.h b/chrome/browser/dom_ui/app_launcher_handler.h index 2f93c9b..5f946d9 100644 --- a/chrome/browser/dom_ui/app_launcher_handler.h +++ b/chrome/browser/dom_ui/app_launcher_handler.h @@ -15,7 +15,7 @@ class Extension; class ExtensionPrefs; -class ExtensionsService; +class ExtensionService; class NotificationRegistrar; class PrefChangeRegistrar; @@ -29,7 +29,7 @@ class AppLauncherHandler public ExtensionInstallUI::Delegate, public NotificationObserver { public: - explicit AppLauncherHandler(ExtensionsService* extension_service); + explicit AppLauncherHandler(ExtensionService* extension_service); virtual ~AppLauncherHandler(); // Populate a dictionary with the information from an extension. @@ -92,7 +92,7 @@ class AppLauncherHandler void AnimateAppIcon(const Extension* extension, const gfx::Rect& rect); // The apps are represented in the extensions model. - scoped_refptr<ExtensionsService> extensions_service_; + scoped_refptr<ExtensionService> extensions_service_; // We monitor changes to the extension system so that we can reload the apps // when necessary. diff --git a/chrome/browser/dom_ui/dom_ui_factory.cc b/chrome/browser/dom_ui/dom_ui_factory.cc index beb4f43..e49abba 100644 --- a/chrome/browser/dom_ui/dom_ui_factory.cc +++ b/chrome/browser/dom_ui/dom_ui_factory.cc @@ -24,7 +24,7 @@ #include "chrome/browser/dom_ui/slideshow_ui.h" #include "chrome/browser/dom_ui/textfields_ui.h" #include "chrome/browser/extensions/extension_dom_ui.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extensions_ui.h" #include "chrome/browser/printing/print_dialog_cloud.h" #include "chrome/browser/profiles/profile.h" @@ -74,7 +74,7 @@ template<> DOMUI* NewDOMUI<ExtensionDOMUI>(TabContents* contents, const GURL& url) { // Don't use a DOMUI for incognito tabs because we require extensions to run // within a single process. - ExtensionsService* service = contents->profile()->GetExtensionsService(); + ExtensionService* service = contents->profile()->GetExtensionService(); if (service && service->ExtensionBindingsAllowed(url)) { return new ExtensionDOMUI(contents, url); @@ -95,7 +95,7 @@ static DOMUIFactoryFunction GetDOMUIFactoryFunction(Profile* profile, if (url.host() == chrome::kChromeUIDialogHost) return &NewDOMUI<ConstrainedHtmlUI>; - ExtensionsService* service = profile->GetExtensionsService(); + ExtensionService* service = profile->GetExtensionService(); if (service && service->ExtensionBindingsAllowed(url)) return &NewDOMUI<ExtensionDOMUI>; diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index 3ac44e4..c75bdf0 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -376,8 +376,8 @@ NewTabUI::NewTabUI(TabContents* contents) AddMessageHandler((new MetricsHandler())->Attach(this)); if (GetProfile()->IsSyncAccessible()) AddMessageHandler((new NewTabPageSyncHandler())->Attach(this)); - ExtensionsService* service = GetProfile()->GetExtensionsService(); - // We might not have an ExtensionsService (on ChromeOS when not logged in + ExtensionService* service = GetProfile()->GetExtensionService(); + // We might not have an ExtensionService (on ChromeOS when not logged in // for example). if (service) AddMessageHandler((new AppLauncherHandler(service))->Attach(this)); diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc index 362a74d..076bf16 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -27,7 +27,7 @@ #include "chrome/browser/download/download_prefs.h" #include "chrome/browser/download/download_status_updater.h" #include "chrome/browser/download/download_util.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/history/download_create_info.h" #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/platform_util.h" diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc index 57a61a4..70514e3 100644 --- a/chrome/browser/download/download_util.cc +++ b/chrome/browser/download/download_util.cc @@ -33,7 +33,7 @@ #include "chrome/browser/download/download_manager.h" #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_install_ui.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/history/download_create_info.h" #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/profiles/profile.h" @@ -232,7 +232,7 @@ void OpenChromeExtension(Profile* profile, DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(download_item.is_extension_install()); - ExtensionsService* service = profile->GetExtensionsService(); + ExtensionService* service = profile->GetExtensionService(); CHECK(service); NotificationService* nservice = NotificationService::current(); GURL nonconst_download_url = download_item.url(); @@ -731,7 +731,7 @@ bool IsDangerous(DownloadCreateInfo* info, Profile* profile) { } else if (danger_level == AllowOnUserGesture && !info->has_user_gesture) { return true; } else if (info->is_extension_install) { - ExtensionsService* service = profile->GetExtensionsService(); + ExtensionService* service = profile->GetExtensionService(); if (!service || !service->IsDownloadFromGallery(info->url, info->referrer_url)) { // Extensions that are not from the gallery are considered dangerous. diff --git a/chrome/browser/extensions/all_urls_apitest.cc b/chrome/browser/extensions/all_urls_apitest.cc index c223177..522610e 100644 --- a/chrome/browser/extensions/all_urls_apitest.cc +++ b/chrome/browser/extensions/all_urls_apitest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_test_message_listener.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" @@ -44,7 +44,7 @@ IN_PROC_BROWSER_TEST_F(AllUrlsApiTest, WhitelistedExtension) { // Then load extensions. Checkpoint("LoadExtension1", start_time); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); ASSERT_TRUE(LoadExtension(extension_dir1)); Checkpoint("LoadExtension2", start_time); @@ -123,7 +123,7 @@ IN_PROC_BROWSER_TEST_F(AllUrlsApiTest, DISABLED_RegularExtensions) { FilePath extension_dir2 = test_data_dir_.AppendASCII("all_urls") .AppendASCII("execute_script"); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); ASSERT_TRUE(LoadExtension(extension_dir1)); ASSERT_TRUE(LoadExtension(extension_dir2)); diff --git a/chrome/browser/extensions/browser_action_apitest.cc b/chrome/browser/extensions/browser_action_apitest.cc index a44ce99..8c413e4 100644 --- a/chrome/browser/extensions/browser_action_apitest.cc +++ b/chrome/browser/extensions/browser_action_apitest.cc @@ -13,7 +13,7 @@ #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_tabs_module.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/ui/browser.h" @@ -286,7 +286,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoBasic) { // Now enable the extension in incognito mode, and test that the browser // action shows up. Note that we don't update the existing window at the // moment, so we just create a new one. - browser()->profile()->GetExtensionsService()->extension_prefs()-> + browser()->profile()->GetExtensionService()->extension_prefs()-> SetIsIncognitoEnabled(extension->id(), true); incognito_browser->CloseWindow(); @@ -299,7 +299,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoBasic) { } IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoDragging) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); // The tooltips for each respective browser action. const char kTooltipA[] = "Make this page red"; diff --git a/chrome/browser/extensions/content_script_extension_process_apitest.cc b/chrome/browser/extensions/content_script_extension_process_apitest.cc index 85672a4..100e77b 100644 --- a/chrome/browser/extensions/content_script_extension_process_apitest.cc +++ b/chrome/browser/extensions/content_script_extension_process_apitest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/ui/browser.h" #include "chrome/common/extensions/extension.h" #include "chrome/test/ui_test_utils.h" diff --git a/chrome/browser/extensions/convert_web_app_browsertest.cc b/chrome/browser/extensions/convert_web_app_browsertest.cc index 079ad15..bb2ea24 100644 --- a/chrome/browser/extensions/convert_web_app_browsertest.cc +++ b/chrome/browser/extensions/convert_web_app_browsertest.cc @@ -6,7 +6,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/notification_details.h" @@ -47,7 +47,7 @@ class ExtensionFromWebAppTest IN_PROC_BROWSER_TEST_F(ExtensionFromWebAppTest, Basic) { ASSERT_TRUE(test_server()->Start()); - browser()->profile()->GetExtensionsService()->set_show_extensions_prompts( + browser()->profile()->GetExtensionService()->set_show_extensions_prompts( false); NotificationRegistrar registrar; diff --git a/chrome/browser/extensions/crashed_extension_infobar.cc b/chrome/browser/extensions/crashed_extension_infobar.cc index 053b4b4..c3576fc 100644 --- a/chrome/browser/extensions/crashed_extension_infobar.cc +++ b/chrome/browser/extensions/crashed_extension_infobar.cc @@ -7,7 +7,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/common/extensions/extension.h" #include "grit/browser_resources.h" #include "grit/generated_resources.h" @@ -15,7 +15,7 @@ CrashedExtensionInfoBarDelegate::CrashedExtensionInfoBarDelegate( TabContents* tab_contents, - ExtensionsService* extensions_service, + ExtensionService* extensions_service, const Extension* extension) : ConfirmInfoBarDelegate(tab_contents), extensions_service_(extensions_service), diff --git a/chrome/browser/extensions/crashed_extension_infobar.h b/chrome/browser/extensions/crashed_extension_infobar.h index 1508ae5..619561c 100644 --- a/chrome/browser/extensions/crashed_extension_infobar.h +++ b/chrome/browser/extensions/crashed_extension_infobar.h @@ -12,7 +12,7 @@ #include "chrome/browser/tab_contents/infobar_delegate.h" class Extension; -class ExtensionsService; +class ExtensionService; class SkBitmap; // This infobar will be displayed when an extension process crashes. It allows @@ -21,9 +21,9 @@ class CrashedExtensionInfoBarDelegate : public ConfirmInfoBarDelegate { public: // |tab_contents| should point to the TabContents the infobar will be added // to. |extension| should be the crashed extension, and |extensions_service| - // the ExtensionsService which manages that extension. + // the ExtensionService which manages that extension. CrashedExtensionInfoBarDelegate(TabContents* tab_contents, - ExtensionsService* extensions_service, + ExtensionService* extensions_service, const Extension* extension); const std::string extension_id() { return extension_id_; } @@ -41,7 +41,7 @@ class CrashedExtensionInfoBarDelegate : public ConfirmInfoBarDelegate { virtual bool Accept(); private: - ExtensionsService* extensions_service_; + ExtensionService* extensions_service_; const std::string extension_id_; const std::string extension_name_; diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc index 8ed780a..f6708c5 100644 --- a/chrome/browser/extensions/crx_installer.cc +++ b/chrome/browser/extensions/crx_installer.cc @@ -23,7 +23,7 @@ #include "chrome/browser/browser_thread.h" #include "chrome/browser/extensions/convert_user_script.h" #include "chrome/browser/extensions/convert_web_app.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_error_reporter.h" #include "chrome/browser/shell_integration.h" #include "chrome/browser/web_applications/web_app.h" @@ -79,7 +79,7 @@ bool CrxInstaller::ClearWhitelistedInstallId(const std::string& id) { return false; } -CrxInstaller::CrxInstaller(ExtensionsService* frontend, +CrxInstaller::CrxInstaller(ExtensionService* frontend, ExtensionInstallUI* client) : install_directory_(frontend->install_directory()), install_source_(Extension::INTERNAL), diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h index c22a4a9..4a6aa28 100644 --- a/chrome/browser/extensions/crx_installer.h +++ b/chrome/browser/extensions/crx_installer.h @@ -15,7 +15,7 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/web_apps.h" -class ExtensionsService; +class ExtensionService; class SkBitmap; // This class installs a crx file into a profile. @@ -65,7 +65,7 @@ class CrxInstaller // frontend->install_directory() then registered with |frontend|. Any install // UI will be displayed using |client|. Pass NULL for |client| for silent // install. - CrxInstaller(ExtensionsService* frontend, + CrxInstaller(ExtensionService* frontend, ExtensionInstallUI* client); // Install the crx in |source_file|. @@ -182,7 +182,7 @@ class CrxInstaller bool create_app_shortcut_; // The extension we're installing. We own this and either pass it off to - // ExtensionsService on success, or delete it on failure. + // ExtensionService on success, or delete it on failure. scoped_refptr<const Extension> extension_; // If non-empty, contains the current version of the extension we're @@ -197,7 +197,7 @@ class CrxInstaller FilePath temp_dir_; // The frontend we will report results back to. - scoped_refptr<ExtensionsService> frontend_; + scoped_refptr<ExtensionService> frontend_; // The client we will work with to do the installation. This can be NULL, in // which case the install is silent. diff --git a/chrome/browser/extensions/crx_installer_browsertest.cc b/chrome/browser/extensions/crx_installer_browsertest.cc index 9dae4a5..e1a412f 100644 --- a/chrome/browser/extensions/crx_installer_browsertest.cc +++ b/chrome/browser/extensions/crx_installer_browsertest.cc @@ -5,7 +5,7 @@ #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_install_ui.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/test/ui_test_utils.h" @@ -48,7 +48,7 @@ class ExtensionCrxInstallerTest : public ExtensionBrowserTest { // happened or not. bool DidWhitelistInstallPrompt(const std::string& crx_relpath, const std::string& id) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); MockInstallUI* mock_install_ui = new MockInstallUI(browser()->profile()); scoped_refptr<CrxInstaller> installer( diff --git a/chrome/browser/extensions/execute_code_in_tab_function.cc b/chrome/browser/extensions/execute_code_in_tab_function.cc index 9657ab2..b3bfee0 100644 --- a/chrome/browser/extensions/execute_code_in_tab_function.cc +++ b/chrome/browser/extensions/execute_code_in_tab_function.cc @@ -9,7 +9,7 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/extensions/extension_tabs_module.h" #include "chrome/browser/extensions/extension_tabs_module_constants.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/file_reader.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" diff --git a/chrome/browser/extensions/extension_accessibility_api.cc b/chrome/browser/extensions/extension_accessibility_api.cc index 507480c..fa0ee0e 100644 --- a/chrome/browser/extensions/extension_accessibility_api.cc +++ b/chrome/browser/extensions/extension_accessibility_api.cc @@ -14,7 +14,7 @@ #include "chrome/browser/extensions/extension_accessibility_api_constants.h" #include "chrome/browser/extensions/extension_event_router.h" #include "chrome/browser/extensions/extension_function_dispatcher.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/common/extensions/extension.h" diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc index b720ccd..dbb47cd 100644 --- a/chrome/browser/extensions/extension_apitest.cc +++ b/chrome/browser/extensions/extension_apitest.cc @@ -7,7 +7,7 @@ #include "base/string_util.h" #include "base/stringprintf.h" #include "chrome/browser/extensions/extension_test_api.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/common/notification_registrar.h" @@ -143,7 +143,7 @@ bool ExtensionApiTest::RunExtensionTestImpl(const char* extension_name, DCHECK(!std::string(extension_name).empty()) << "Relative page_url given with no extension_name"; - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const Extension* extension = service->GetExtensionById(last_loaded_extension_id_, false); if (!extension) @@ -166,7 +166,7 @@ bool ExtensionApiTest::RunExtensionTestImpl(const char* extension_name, // Test that exactly one extension loaded. const Extension* ExtensionApiTest::GetSingleLoadedExtension() { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); int found_extension_index = -1; for (size_t i = 0; i < service->extensions()->size(); ++i) { diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc index 8181b71..6f29447 100644 --- a/chrome/browser/extensions/extension_browsertest.cc +++ b/chrome/browser/extensions/extension_browsertest.cc @@ -15,7 +15,7 @@ #include "chrome/browser/extensions/extension_error_reporter.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_install_ui.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/omnibox/location_bar.h" @@ -46,7 +46,7 @@ void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { #if defined(OS_CHROMEOS) // This makes sure that we create the Default profile first, with no - // ExtensionsService and then the real profile with one, as we do when + // ExtensionService and then the real profile with one, as we do when // running on chromeos. command_line->AppendSwitchASCII(switches::kLoginUser, "TestUser@gmail.com"); @@ -57,7 +57,7 @@ void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { bool ExtensionBrowserTest::LoadExtensionImpl(const FilePath& path, bool incognito_enabled) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); { NotificationRegistrar registrar; registrar.Add(this, NotificationType::EXTENSION_LOADED, @@ -124,7 +124,7 @@ bool ExtensionBrowserTest::InstallOrUpdateExtension(const std::string& id, const FilePath& path, InstallUIType ui_type, int expected_change) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); service->set_show_extensions_prompts(false); size_t num_before = service->extensions()->size(); @@ -174,7 +174,7 @@ bool ExtensionBrowserTest::InstallOrUpdateExtension(const std::string& id, } void ExtensionBrowserTest::ReloadExtension(const std::string& extension_id) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); service->ReloadExtension(extension_id); ui_test_utils::RegisterAndWait(this, NotificationType::EXTENSION_LOADED, @@ -182,22 +182,22 @@ void ExtensionBrowserTest::ReloadExtension(const std::string& extension_id) { } void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); service->UnloadExtension(extension_id); } void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); service->UninstallExtension(extension_id, false); } void ExtensionBrowserTest::DisableExtension(const std::string& extension_id) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); service->DisableExtension(extension_id); } void ExtensionBrowserTest::EnableExtension(const std::string& extension_id) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); service->EnableExtension(extension_id); } @@ -272,7 +272,7 @@ void ExtensionBrowserTest::WaitForExtensionLoad() { bool ExtensionBrowserTest::WaitForExtensionCrash( const std::string& extension_id) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); if (!service->GetExtensionById(extension_id, true)) { // The extension is already unloaded, presumably due to a crash. diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc index f554d11..3af1ea6 100644 --- a/chrome/browser/extensions/extension_browsertests_misc.cc +++ b/chrome/browser/extensions/extension_browsertests_misc.cc @@ -13,7 +13,7 @@ #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_process_manager.h" #include "chrome/browser/extensions/extension_tabs_module.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_updater.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" @@ -269,7 +269,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, UnloadPageAction) { IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageActionRefreshCrash) { base::TimeTicks start_time = base::TimeTicks::Now(); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); size_t size_before = service->extensions()->size(); @@ -338,7 +338,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, RSSMultiRelLink) { // Tests that tooltips of a browser action icon can be specified using UTF8. // See http://crbug.com/25349. IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationBrowserAction) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); FilePath extension_path(test_data_dir_.AppendASCII("browsertest") .AppendASCII("title_localized")); @@ -361,7 +361,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationBrowserAction) { IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationPageAction) { ASSERT_TRUE(test_server()->Start()); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); FilePath extension_path(test_data_dir_.AppendASCII("browsertest") @@ -460,7 +460,7 @@ void NavigateToFeedAndValidate(net::TestServer* server, // TODO(finnur): Implement this is a non-flaky way. } - ExtensionsService* service = browser->profile()->GetExtensionsService(); + ExtensionService* service = browser->profile()->GetExtensionService(); const Extension* extension = service->extensions()->back(); std::string id = extension->id(); @@ -762,7 +762,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PluginLoadUnload) { tab->render_view_host(), L"", L"testPluginWorks()", &result)); EXPECT_FALSE(result); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); ASSERT_TRUE(LoadExtension(extension_dir)); EXPECT_EQ(size_before + 1, service->extensions()->size()); @@ -814,7 +814,7 @@ static const wchar_t* jscript_click_option_button = IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, DISABLED_OptionsPage) { // Install an extension with an options page. ASSERT_TRUE(InstallExtension(test_data_dir_.AppendASCII("options.crx"), 1)); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const ExtensionList* extensions = service->extensions(); ASSERT_EQ(1u, extensions->size()); const Extension* extension = extensions->at(0); diff --git a/chrome/browser/extensions/extension_context_menu_api.cc b/chrome/browser/extensions/extension_context_menu_api.cc index 624eb20..78f4f03 100644 --- a/chrome/browser/extensions/extension_context_menu_api.cc +++ b/chrome/browser/extensions/extension_context_menu_api.cc @@ -9,7 +9,7 @@ #include "base/values.h" #include "base/string_number_conversions.h" #include "base/string_util.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/extensions/extension_error_utils.h" @@ -213,7 +213,7 @@ bool CreateContextMenuFunction::RunImpl() { return false; ExtensionMenuManager* menu_manager = - profile()->GetExtensionsService()->menu_manager(); + profile()->GetExtensionService()->menu_manager(); ExtensionMenuItem::ContextList contexts(ExtensionMenuItem::PAGE); if (!ParseContexts(*properties, kContextsKey, &contexts)) @@ -268,7 +268,7 @@ bool UpdateContextMenuFunction::RunImpl() { ExtensionMenuItem::Id item_id(profile(), extension_id(), 0); EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &item_id.uid)); - ExtensionsService* service = profile()->GetExtensionsService(); + ExtensionService* service = profile()->GetExtensionService(); ExtensionMenuManager* manager = service->menu_manager(); ExtensionMenuItem* item = manager->GetItemById(item_id); if (!item || item->extension_id() != extension_id()) { @@ -282,7 +282,7 @@ bool UpdateContextMenuFunction::RunImpl() { EXTENSION_FUNCTION_VALIDATE(properties != NULL); ExtensionMenuManager* menu_manager = - profile()->GetExtensionsService()->menu_manager(); + profile()->GetExtensionService()->menu_manager(); // Type. ExtensionMenuItem::Type type; @@ -334,7 +334,7 @@ bool UpdateContextMenuFunction::RunImpl() { bool RemoveContextMenuFunction::RunImpl() { ExtensionMenuItem::Id id(profile(), extension_id(), 0); EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &id.uid)); - ExtensionsService* service = profile()->GetExtensionsService(); + ExtensionService* service = profile()->GetExtensionService(); ExtensionMenuManager* manager = service->menu_manager(); ExtensionMenuItem* item = manager->GetItemById(id); @@ -349,7 +349,7 @@ bool RemoveContextMenuFunction::RunImpl() { } bool RemoveAllContextMenusFunction::RunImpl() { - ExtensionsService* service = profile()->GetExtensionsService(); + ExtensionService* service = profile()->GetExtensionService(); ExtensionMenuManager* manager = service->menu_manager(); manager->RemoveAllContextItems(extension_id()); return true; diff --git a/chrome/browser/extensions/extension_context_menu_browsertest.cc b/chrome/browser/extensions/extension_context_menu_browsertest.cc index 08d95c5..fe893f9 100644 --- a/chrome/browser/extensions/extension_context_menu_browsertest.cc +++ b/chrome/browser/extensions/extension_context_menu_browsertest.cc @@ -8,7 +8,7 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_test_message_listener.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/render_view_context_menu.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -146,14 +146,14 @@ class ExtensionContextMenuBrowserTest : public ExtensionBrowserTest { // Shortcut to return the current ExtensionMenuManager. ExtensionMenuManager* menu_manager() { - return browser()->profile()->GetExtensionsService()->menu_manager(); + return browser()->profile()->GetExtensionService()->menu_manager(); } // Returns a pointer to the currently loaded extension with |name|, or null // if not found. const Extension* GetExtensionNamed(std::string name) { const ExtensionList* extensions = - browser()->profile()->GetExtensionsService()->extensions(); + browser()->profile()->GetExtensionService()->extensions(); ExtensionList::const_iterator i; for (i = extensions->begin(); i != extensions->end(); ++i) { if ((*i)->name() == name) { diff --git a/chrome/browser/extensions/extension_context_menu_model.cc b/chrome/browser/extensions/extension_context_menu_model.cc index a0ec3d0..70d4189 100644 --- a/chrome/browser/extensions/extension_context_menu_model.cc +++ b/chrome/browser/extensions/extension_context_menu_model.cc @@ -5,7 +5,7 @@ #include "chrome/browser/extensions/extension_context_menu_model.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_tabs_module.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" @@ -117,12 +117,12 @@ void ExtensionContextMenuModel::ExecuteCommand(int command_id) { browser_); break; case HIDE: { - ExtensionsService* extension_service = profile_->GetExtensionsService(); + ExtensionService* extension_service = profile_->GetExtensionService(); extension_service->SetBrowserActionVisibility(extension, false); break; } case DISABLE: { - ExtensionsService* extension_service = profile_->GetExtensionsService(); + ExtensionService* extension_service = profile_->GetExtensionService(); extension_service->DisableExtension(extension_id_); break; } @@ -149,7 +149,7 @@ void ExtensionContextMenuModel::ExecuteCommand(int command_id) { void ExtensionContextMenuModel::InstallUIProceed() { if (GetExtension()) - profile_->GetExtensionsService()->UninstallExtension(extension_id_, false); + profile_->GetExtensionService()->UninstallExtension(extension_id_, false); Release(); } @@ -159,6 +159,6 @@ void ExtensionContextMenuModel::InstallUIAbort() { } const Extension* ExtensionContextMenuModel::GetExtension() const { - ExtensionsService* extension_service = profile_->GetExtensionsService(); + ExtensionService* extension_service = profile_->GetExtensionService(); return extension_service->GetExtensionById(extension_id_, false); } diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc index 1914ec7..91c7c7f 100644 --- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc +++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc @@ -7,7 +7,7 @@ #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_process_manager.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" @@ -19,8 +19,8 @@ class ExtensionCrashRecoveryTest : public ExtensionBrowserTest { protected: - ExtensionsService* GetExtensionsService() { - return browser()->profile()->GetExtensionsService(); + ExtensionService* GetExtensionService() { + return browser()->profile()->GetExtensionService(); } ExtensionProcessManager* GetExtensionProcessManager() { @@ -51,9 +51,9 @@ class ExtensionCrashRecoveryTest : public ExtensionBrowserTest { } void CrashExtension(size_t index) { - ASSERT_LT(index, GetExtensionsService()->extensions()->size()); + ASSERT_LT(index, GetExtensionService()->extensions()->size()); const Extension* extension = - GetExtensionsService()->extensions()->at(index); + GetExtensionService()->extensions()->at(index); ASSERT_TRUE(extension); std::string extension_id(extension->id()); ExtensionHost* extension_host = @@ -69,9 +69,9 @@ class ExtensionCrashRecoveryTest : public ExtensionBrowserTest { } void CheckExtensionConsistency(size_t index) { - ASSERT_LT(index, GetExtensionsService()->extensions()->size()); + ASSERT_LT(index, GetExtensionService()->extensions()->size()); const Extension* extension = - GetExtensionsService()->extensions()->at(index); + GetExtensionService()->extensions()->at(index); ASSERT_TRUE(extension); ExtensionHost* extension_host = GetExtensionProcessManager()->GetBackgroundHostForExtension(extension); @@ -84,21 +84,21 @@ class ExtensionCrashRecoveryTest : public ExtensionBrowserTest { void LoadTestExtension() { ExtensionBrowserTest::SetUpInProcessBrowserTestFixture(); - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); ASSERT_TRUE(LoadExtension( test_data_dir_.AppendASCII("common").AppendASCII("background_page"))); - const Extension* extension = GetExtensionsService()->extensions()->back(); + const Extension* extension = GetExtensionService()->extensions()->back(); ASSERT_TRUE(extension); first_extension_id_ = extension->id(); CheckExtensionConsistency(size_before); } void LoadSecondExtension() { - int offset = GetExtensionsService()->extensions()->size(); + int offset = GetExtensionService()->extensions()->size(); ASSERT_TRUE(LoadExtension( test_data_dir_.AppendASCII("install").AppendASCII("install"))); const Extension* extension = - GetExtensionsService()->extensions()->at(offset); + GetExtensionService()->extensions()->at(offset); ASSERT_TRUE(extension); second_extension_id_ = extension->id(); CheckExtensionConsistency(offset); @@ -109,10 +109,10 @@ class ExtensionCrashRecoveryTest : public ExtensionBrowserTest { }; IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, Basic) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); AcceptCrashedExtensionInfobar(0); SCOPED_TRACE("after clicking the infobar"); @@ -120,10 +120,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, Basic) { } IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, CloseAndReload) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); CancelCrashedExtensionInfobar(0); ReloadExtension(first_extension_id_); @@ -132,10 +132,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, CloseAndReload) { } IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, ReloadIndependently) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); ReloadExtension(first_extension_id_); @@ -154,18 +154,18 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, ReloadIndependently) { // and close the browser, it doesn't crash. The browser is closed implicitly // at the end of each browser test. IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, ShutdownWhileCrashed) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); } IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsCrashFirst) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); LoadSecondExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before + 1, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); AcceptCrashedExtensionInfobar(0); SCOPED_TRACE("after clicking the infobar"); @@ -174,11 +174,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsCrashFirst) { } IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsCrashSecond) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); LoadSecondExtension(); CrashExtension(size_before + 1); - ASSERT_EQ(size_before + 1, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); AcceptCrashedExtensionInfobar(0); SCOPED_TRACE("after clicking the infobar"); @@ -188,13 +188,13 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsCrashSecond) { IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsCrashBothAtOnce) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); LoadSecondExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before + 1, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); { SCOPED_TRACE("first infobar"); @@ -211,13 +211,13 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, } IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsOneByOne) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); LoadSecondExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); { SCOPED_TRACE("first infobar"); @@ -238,42 +238,42 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsOneByOne) { // at the end of each browser test. IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsShutdownWhileCrashed) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); LoadSecondExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); } IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsIgnoreFirst) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); LoadSecondExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before + 1, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); CancelCrashedExtensionInfobar(0); AcceptCrashedExtensionInfobar(1); SCOPED_TRACE("infobars done"); - ASSERT_EQ(size_before + 1, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); CheckExtensionConsistency(size_before); } IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest, TwoExtensionsReloadIndependently) { - const size_t size_before = GetExtensionsService()->extensions()->size(); + const size_t size_before = GetExtensionService()->extensions()->size(); LoadTestExtension(); LoadSecondExtension(); CrashExtension(size_before); - ASSERT_EQ(size_before + 1, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before + 1, GetExtensionService()->extensions()->size()); CrashExtension(size_before); - ASSERT_EQ(size_before, GetExtensionsService()->extensions()->size()); + ASSERT_EQ(size_before, GetExtensionService()->extensions()->size()); { SCOPED_TRACE("first: reload"); diff --git a/chrome/browser/extensions/extension_data_deleter.h b/chrome/browser/extensions/extension_data_deleter.h index 9f83546..960f06f 100644 --- a/chrome/browser/extensions/extension_data_deleter.h +++ b/chrome/browser/extensions/extension_data_deleter.h @@ -25,7 +25,7 @@ class WebKitContext; // A helper class that takes care of removing local storage, databases and // cookies for a given extension. This is used by -// ExtensionsService::ClearExtensionData() upon uninstalling an extension. +// ExtensionService::ClearExtensionData() upon uninstalling an extension. class ExtensionDataDeleter : public base::RefCountedThreadSafe<ExtensionDataDeleter, BrowserThread::DeleteOnUIThread> { diff --git a/chrome/browser/extensions/extension_devtools_browsertests.cc b/chrome/browser/extensions/extension_devtools_browsertests.cc index 7b04d17..5742d7b 100644 --- a/chrome/browser/extensions/extension_devtools_browsertests.cc +++ b/chrome/browser/extensions/extension_devtools_browsertests.cc @@ -11,7 +11,7 @@ #include "chrome/browser/extensions/extension_error_reporter.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_process_manager.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_tabs_module.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" diff --git a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc index f1ec321..f75ed27 100644 --- a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc +++ b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc @@ -9,7 +9,7 @@ #include "app/l10n_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/extensions/extension_install_ui.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/tab_contents/infobar_delegate.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/browser_list.h" @@ -24,7 +24,7 @@ class ExtensionDisabledDialogDelegate public base::RefCountedThreadSafe<ExtensionDisabledDialogDelegate> { public: ExtensionDisabledDialogDelegate(Profile* profile, - ExtensionsService* service, + ExtensionService* service, const Extension* extension) : service_(service), extension_(extension) { AddRef(); // Balanced in Proceed or Abort. @@ -51,7 +51,7 @@ class ExtensionDisabledDialogDelegate // The UI for showing the install dialog when enabling. scoped_ptr<ExtensionInstallUI> install_ui_; - ExtensionsService* service_; + ExtensionService* service_; const Extension* extension_; }; @@ -60,7 +60,7 @@ class ExtensionDisabledInfobarDelegate public NotificationObserver { public: ExtensionDisabledInfobarDelegate(TabContents* tab_contents, - ExtensionsService* service, + ExtensionService* service, const Extension* extension) : ConfirmInfoBarDelegate(tab_contents), tab_contents_(tab_contents), @@ -121,11 +121,11 @@ class ExtensionDisabledInfobarDelegate private: NotificationRegistrar registrar_; TabContents* tab_contents_; - ExtensionsService* service_; + ExtensionService* service_; const Extension* extension_; }; -void ShowExtensionDisabledUI(ExtensionsService* service, Profile* profile, +void ShowExtensionDisabledUI(ExtensionService* service, Profile* profile, const Extension* extension) { Browser* browser = BrowserList::GetLastActiveWithProfile(profile); if (!browser) @@ -139,7 +139,7 @@ void ShowExtensionDisabledUI(ExtensionsService* service, Profile* profile, tab_contents, service, extension)); } -void ShowExtensionDisabledDialog(ExtensionsService* service, Profile* profile, +void ShowExtensionDisabledDialog(ExtensionService* service, Profile* profile, const Extension* extension) { // This object manages its own lifetime. new ExtensionDisabledDialogDelegate(profile, service, extension); diff --git a/chrome/browser/extensions/extension_disabled_infobar_delegate.h b/chrome/browser/extensions/extension_disabled_infobar_delegate.h index 430e652..665b0eb 100644 --- a/chrome/browser/extensions/extension_disabled_infobar_delegate.h +++ b/chrome/browser/extensions/extension_disabled_infobar_delegate.h @@ -7,16 +7,16 @@ #pragma once class Extension; -class ExtensionsService; +class ExtensionService; class Profile; // Shows UI to inform the user that an extension was disabled after upgrading // to higher permissions. -void ShowExtensionDisabledUI(ExtensionsService* service, Profile* profile, +void ShowExtensionDisabledUI(ExtensionService* service, Profile* profile, const Extension* extension); // Shows the extension install dialog. -void ShowExtensionDisabledDialog(ExtensionsService* service, Profile* profile, +void ShowExtensionDisabledDialog(ExtensionService* service, Profile* profile, const Extension* extension); #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_DISABLED_INFOBAR_DELEGATE_H_ diff --git a/chrome/browser/extensions/extension_dom_ui.cc b/chrome/browser/extensions/extension_dom_ui.cc index c59383f0..97889d7 100644 --- a/chrome/browser/extensions/extension_dom_ui.cc +++ b/chrome/browser/extensions/extension_dom_ui.cc @@ -12,7 +12,7 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/extensions/extension_bookmark_manager_api.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/image_loading_tracker.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" @@ -64,7 +64,7 @@ class ExtensionDOMUIImageLoadingTracker : public ImageLoadingTracker::Observer { extension_(NULL) { // Even when the extensions service is enabled by default, it's still // disabled in incognito mode. - ExtensionsService* service = profile->GetExtensionsService(); + ExtensionService* service = profile->GetExtensionService(); if (service) extension_ = service->GetExtensionByURL(page_url); } @@ -125,7 +125,7 @@ const char ExtensionDOMUI::kExtensionURLOverrides[] = ExtensionDOMUI::ExtensionDOMUI(TabContents* tab_contents, const GURL& url) : DOMUI(tab_contents), url_(url) { - ExtensionsService* service = tab_contents->profile()->GetExtensionsService(); + ExtensionService* service = tab_contents->profile()->GetExtensionService(); const Extension* extension = service->GetExtensionByURL(url); if (!extension) extension = service->GetExtensionByWebExtent(url); @@ -242,7 +242,7 @@ bool ExtensionDOMUI::HandleChromeURLOverride(GURL* url, Profile* profile) { if (!overrides || !overrides->GetList(page, &url_list)) return false; - ExtensionsService* service = profile->GetExtensionsService(); + ExtensionService* service = profile->GetExtensionService(); size_t i = 0; while (i < url_list->GetSize()) { diff --git a/chrome/browser/extensions/extension_event_router.cc b/chrome/browser/extensions/extension_event_router.cc index 8771c8c..0b4f799 100644 --- a/chrome/browser/extensions/extension_event_router.cc +++ b/chrome/browser/extensions/extension_event_router.cc @@ -10,7 +10,7 @@ #include "chrome/browser/extensions/extension_processes_api.h" #include "chrome/browser/extensions/extension_processes_api_constants.h" #include "chrome/browser/extensions/extension_tabs_module.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/common/extensions/extension.h" @@ -56,7 +56,7 @@ struct ExtensionEventRouter::EventListener { bool ExtensionEventRouter::CanCrossIncognito(Profile* profile, const std::string& extension_id) { const Extension* extension = - profile->GetExtensionsService()->GetExtensionById(extension_id, false); + profile->GetExtensionService()->GetExtensionById(extension_id, false); return CanCrossIncognito(profile, extension); } @@ -66,7 +66,7 @@ bool ExtensionEventRouter::CanCrossIncognito(Profile* profile, // We allow the extension to see events and data from another profile iff it // uses "spanning" behavior and it has incognito access. "split" mode // extensions only see events for a matching profile. - return (profile->GetExtensionsService()->IsIncognitoEnabled(extension) && + return (profile->GetExtensionService()->IsIncognitoEnabled(extension) && !extension->incognito_split_mode()); } @@ -168,7 +168,7 @@ void ExtensionEventRouter::DispatchEventImpl( return; std::set<EventListener>& listeners = it->second; - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); // Send the event only to renderers that are listening for it. for (std::set<EventListener>::iterator listener = listeners.begin(); diff --git a/chrome/browser/extensions/extension_function.cc b/chrome/browser/extensions/extension_function.cc index f0bf60d..054c882 100644 --- a/chrome/browser/extensions/extension_function.cc +++ b/chrome/browser/extensions/extension_function.cc @@ -7,7 +7,7 @@ #include "base/json/json_writer.h" #include "base/logging.h" #include "chrome/browser/extensions/extension_function_dispatcher.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" ExtensionFunction::ExtensionFunction() @@ -22,7 +22,7 @@ ExtensionFunction::~ExtensionFunction() { } const Extension* ExtensionFunction::GetExtension() { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); DCHECK(service); return service->GetExtensionById(extension_id_, false); } diff --git a/chrome/browser/extensions/extension_function_dispatcher.cc b/chrome/browser/extensions/extension_function_dispatcher.cc index 9d9654c..b037b1c 100644 --- a/chrome/browser/extensions/extension_function_dispatcher.cc +++ b/chrome/browser/extensions/extension_function_dispatcher.cc @@ -50,7 +50,7 @@ #include "chrome/browser/extensions/extension_tts_api.h" #include "chrome/browser/extensions/extension_webstore_private_api.h" #include "chrome/browser/extensions/extensions_quota_service.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" @@ -341,8 +341,8 @@ ExtensionFunctionDispatcher* ExtensionFunctionDispatcher::Create( RenderViewHost* render_view_host, Delegate* delegate, const GURL& url) { - ExtensionsService* service = - render_view_host->process()->profile()->GetExtensionsService(); + ExtensionService* service = + render_view_host->process()->profile()->GetExtensionService(); DCHECK(service); if (!service->ExtensionBindingsAllowed(url)) @@ -453,7 +453,7 @@ void ExtensionFunctionDispatcher::HandleRequest( function->set_request_id(params.request_id); function->set_has_callback(params.has_callback); function->set_user_gesture(params.user_gesture); - ExtensionsService* service = profile()->GetExtensionsService(); + ExtensionService* service = profile()->GetExtensionService(); DCHECK(service); const Extension* extension = service->GetExtensionById(extension_id(), false); DCHECK(extension); diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc index 1051399..df34a97 100644 --- a/chrome/browser/extensions/extension_host.cc +++ b/chrome/browser/extensions/extension_host.cc @@ -21,7 +21,7 @@ #include "chrome/browser/dom_ui/dom_ui_factory.h" #include "chrome/browser/extensions/extension_message_service.h" #include "chrome/browser/extensions/extension_tabs_module.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/file_select_helper.h" #include "chrome/browser/platform_util.h" #include "chrome/browser/prefs/pref_service.h" @@ -210,7 +210,7 @@ void ExtensionHost::CreateRenderViewNow() { NavigateToURL(url_); DCHECK(IsRenderViewLive()); if (is_background_page()) - profile_->GetExtensionsService()->DidCreateRenderViewForBackgroundPage( + profile_->GetExtensionService()->DidCreateRenderViewForBackgroundPage( this); } @@ -235,7 +235,7 @@ void ExtensionHost::NavigateToURL(const GURL& url) { url_ = url; if (!is_background_page() && - !profile_->GetExtensionsService()->IsBackgroundPageReady(extension_)) { + !profile_->GetExtensionService()->IsBackgroundPageReady(extension_)) { // Make sure the background page loads before any others. registrar_.Add(this, NotificationType::EXTENSION_BACKGROUND_PAGE_READY, Source<Extension>(extension_)); @@ -250,7 +250,7 @@ void ExtensionHost::Observe(NotificationType type, const NotificationDetails& details) { switch (type.value) { case NotificationType::EXTENSION_BACKGROUND_PAGE_READY: - DCHECK(profile_->GetExtensionsService()-> + DCHECK(profile_->GetExtensionService()-> IsBackgroundPageReady(extension_)); NavigateToURL(url_); break; @@ -397,7 +397,7 @@ void ExtensionHost::DocumentAvailableInMainFrame(RenderViewHost* rvh) { document_element_available_ = true; if (is_background_page()) { - profile_->GetExtensionsService()->SetBackgroundPageReady(extension_); + profile_->GetExtensionService()->SetBackgroundPageReady(extension_); } else { switch (extension_host_type_) { case ViewType::EXTENSION_INFOBAR: diff --git a/chrome/browser/extensions/extension_idle_api.cc b/chrome/browser/extensions/extension_idle_api.cc index b3816ff..94691e1 100644 --- a/chrome/browser/extensions/extension_idle_api.cc +++ b/chrome/browser/extensions/extension_idle_api.cc @@ -17,7 +17,7 @@ #include "chrome/browser/extensions/extension_event_router.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_idle_api_constants.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/ui/browser.h" diff --git a/chrome/browser/extensions/extension_incognito_apitest.cc b/chrome/browser/extensions/extension_incognito_apitest.cc index a6548b3..55ee19e 100644 --- a/chrome/browser/extensions/extension_incognito_apitest.cc +++ b/chrome/browser/extensions/extension_incognito_apitest.cc @@ -6,7 +6,7 @@ #include "chrome/browser/browser_window.h" #include "chrome/browser/extensions/browser_action_test_util.h" #include "chrome/browser/extensions/extension_apitest.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_test_message_listener.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/extensions/extension_install_ui_browsertest.cc b/chrome/browser/extensions/extension_install_ui_browsertest.cc index cca76dc..6866325 100644 --- a/chrome/browser/extensions/extension_install_ui_browsertest.cc +++ b/chrome/browser/extensions/extension_install_ui_browsertest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "chrome/browser/extensions/extension_browsertest.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" diff --git a/chrome/browser/extensions/extension_management_api.cc b/chrome/browser/extensions/extension_management_api.cc index 01ba146..216648c 100644 --- a/chrome/browser/extensions/extension_management_api.cc +++ b/chrome/browser/extensions/extension_management_api.cc @@ -13,7 +13,7 @@ #include "base/string_util.h" #include "chrome/browser/extensions/extension_event_names.h" #include "chrome/browser/extensions/extension_event_router.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_updater.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" @@ -47,8 +47,8 @@ const char kNoExtensionError[] = "No extension with id *"; const char kNotAnAppError[] = "Extension * is not an App"; } -ExtensionsService* ExtensionManagementFunction::service() { - return profile()->GetExtensionsService(); +ExtensionService* ExtensionManagementFunction::service() { + return profile()->GetExtensionService(); } static DictionaryValue* CreateExtensionInfo(const Extension& extension, @@ -269,7 +269,7 @@ void ExtensionManagementEventRouter::Observe( } else { const Extension* extension = Details<const Extension>(details).ptr(); CHECK(extension); - ExtensionsService* service = profile->GetExtensionsService(); + ExtensionService* service = profile->GetExtensionService(); bool enabled = service->GetExtensionById(extension->id(), false) != NULL; args.Append(CreateExtensionInfo(*extension, enabled)); } diff --git a/chrome/browser/extensions/extension_management_api.h b/chrome/browser/extensions/extension_management_api.h index 864741f..5349955 100644 --- a/chrome/browser/extensions/extension_management_api.h +++ b/chrome/browser/extensions/extension_management_api.h @@ -11,11 +11,11 @@ #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" -class ExtensionsService; +class ExtensionService; class ExtensionManagementFunction : public SyncExtensionFunction { protected: - ExtensionsService* service(); + ExtensionService* service(); }; class GetAllExtensionsFunction : public ExtensionManagementFunction { diff --git a/chrome/browser/extensions/extension_management_apitest.cc b/chrome/browser/extensions/extension_management_apitest.cc index 00f793f..9883f5d 100644 --- a/chrome/browser/extensions/extension_management_apitest.cc +++ b/chrome/browser/extensions/extension_management_apitest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" @@ -19,7 +19,7 @@ class ExtensionManagementApiTest : public ExtensionApiTest { ASSERT_TRUE(LoadExtension(basedir.AppendASCII("permissions"))); // Load 2 disabled items. - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); ASSERT_TRUE(LoadExtension(basedir.AppendASCII("disabled_extension"))); service->DisableExtension(last_loaded_extension_id_); ASSERT_TRUE(LoadExtension(basedir.AppendASCII("disabled_app"))); diff --git a/chrome/browser/extensions/extension_management_browsertest.cc b/chrome/browser/extensions/extension_management_browsertest.cc index c8a6b40..a1eb2f6 100644 --- a/chrome/browser/extensions/extension_management_browsertest.cc +++ b/chrome/browser/extensions/extension_management_browsertest.cc @@ -6,7 +6,7 @@ #include "chrome/browser/extensions/autoupdate_interceptor.h" #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_host.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_test_message_listener.h" #include "chrome/browser/extensions/extension_updater.h" #include "chrome/browser/prefs/pref_service.h" @@ -57,7 +57,7 @@ class ExtensionManagementTest : public ExtensionBrowserTest { // to the second version requiring increased permissions. Returns whether // the operation was completed successfully. bool InstallAndUpdateIncreasingPermissionsExtension() { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); size_t size_before = service->extensions()->size(); // Install the initial version, which should happen just fine. @@ -82,7 +82,7 @@ class ExtensionManagementTest : public ExtensionBrowserTest { // Tests that installing the same version overwrites. IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, InstallSameVersion) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); ASSERT_TRUE(InstallExtension( test_data_dir_.AppendASCII("install/install.crx"), 1)); @@ -100,7 +100,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, InstallSameVersion) { } IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, InstallOlderVersion) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); ASSERT_TRUE(InstallExtension( test_data_dir_.AppendASCII("install/install.crx"), 1)); @@ -111,7 +111,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, InstallOlderVersion) { } IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, InstallThenCancel) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); ASSERT_TRUE(InstallExtension( test_data_dir_.AppendASCII("install/install.crx"), 1)); @@ -138,7 +138,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, Incognito) { // Tests the process of updating an extension to one that requires higher // permissions. IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, UpdatePermissions) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); ASSERT_TRUE(InstallAndUpdateIncreasingPermissionsExtension()); const size_t size_before = service->extensions()->size(); @@ -150,7 +150,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, UpdatePermissions) { // Tests that we can uninstall a disabled extension. IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, UninstallDisabled) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); ASSERT_TRUE(InstallAndUpdateIncreasingPermissionsExtension()); const size_t size_before = service->extensions()->size(); @@ -164,7 +164,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, UninstallDisabled) { IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, DisableEnable) { ExtensionProcessManager* manager = browser()->profile()-> GetExtensionProcessManager(); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); // Load an extension, expect the background page to be available. @@ -207,7 +207,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, AutoUpdate) { // Install version 1 of the extension. ExtensionTestMessageListener listener1("v1 installed", false); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); ASSERT_TRUE(service->disabled_extensions()->empty()); ASSERT_TRUE(InstallExtension(basedir.AppendASCII("v1.crx"), 1)); @@ -253,7 +253,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, AutoUpdate) { // See http://crbug.com/57378 for flakiness details. IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, ExternalUrlUpdate) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const char* kExtensionId = "ogjcoiohnmldgjemafoockdghcjciccf"; // We don't want autoupdate blacklist checks. service->updater()->set_blacklist_checks_enabled(false); @@ -273,7 +273,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, ExternalUrlUpdate) { ASSERT_TRUE(service->disabled_extensions()->empty()); // The code that reads external_extensions.json uses this method to inform - // the ExtensionsService of an extension to download. Using the real code + // the ExtensionService of an extension to download. Using the real code // is race-prone, because instantating the ExtensionService starts a read // of external_extensions.json before this test function starts. service->AddPendingExtensionFromExternalUpdateUrl( @@ -325,7 +325,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, ExternalUrlUpdate) { // See http://crbug.com/57378 for flakiness details. IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, ExternalPolicyRefresh) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const char* kExtensionId = "ogjcoiohnmldgjemafoockdghcjciccf"; // We don't want autoupdate blacklist checks. service->updater()->set_blacklist_checks_enabled(false); diff --git a/chrome/browser/extensions/extension_module.cc b/chrome/browser/extensions/extension_module.cc index 34bacdf..1ef27a9 100644 --- a/chrome/browser/extensions/extension_module.cc +++ b/chrome/browser/extensions/extension_module.cc @@ -7,11 +7,11 @@ #include <string> #include "chrome/browser/extensions/extension_prefs.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" ExtensionPrefs* SetUpdateUrlDataFunction::extension_prefs() { - return profile()->GetExtensionsService()->extension_prefs(); + return profile()->GetExtensionService()->extension_prefs(); } bool SetUpdateUrlDataFunction::RunImpl() { diff --git a/chrome/browser/extensions/extension_omnibox_api.cc b/chrome/browser/extensions/extension_omnibox_api.cc index 760e459..4981c98 100644 --- a/chrome/browser/extensions/extension_omnibox_api.cc +++ b/chrome/browser/extensions/extension_omnibox_api.cc @@ -10,7 +10,7 @@ #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/extensions/extension_event_router.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/common/notification_service.h" @@ -48,11 +48,11 @@ PropertyAccessor<ExtensionOmniboxSuggestion>& GetPropertyAccessor() { const ExtensionOmniboxSuggestion* GetDefaultSuggestionForExtension( Profile* profile, const std::string& extension_id) { const Extension* extension = - profile->GetExtensionsService()->GetExtensionById(extension_id, false); + profile->GetExtensionService()->GetExtensionById(extension_id, false); if (!extension) return NULL; return GetPropertyAccessor().GetProperty( - profile->GetExtensionsService()->GetPropertyBag(extension)); + profile->GetExtensionService()->GetPropertyBag(extension)); } }; // namespace @@ -164,7 +164,7 @@ bool OmniboxSetDefaultSuggestionFunction::RunImpl() { // Store the suggestion in the extension's runtime data. GetPropertyAccessor().SetProperty( - profile_->GetExtensionsService()->GetPropertyBag(GetExtension()), + profile_->GetExtensionService()->GetPropertyBag(GetExtension()), suggestion); NotificationService::current()->Notify( diff --git a/chrome/browser/extensions/extension_override_apitest.cc b/chrome/browser/extensions/extension_override_apitest.cc index cd7785b..4fd73f4 100644 --- a/chrome/browser/extensions/extension_override_apitest.cc +++ b/chrome/browser/extensions/extension_override_apitest.cc @@ -5,7 +5,7 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_dom_ui.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -115,7 +115,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, ShouldNotCreateDuplicateEntries) { for (size_t i = 0; i < 3; ++i) { ExtensionDOMUI::RegisterChromeURLOverrides( browser()->profile(), - browser()->profile()->GetExtensionsService()->extensions()->back()-> + browser()->profile()->GetExtensionService()->extensions()->back()-> GetChromeURLOverrides()); } @@ -161,7 +161,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, OverrideKeyboard) { // Unload the failing version. We should be back to passing now. const ExtensionList *extensions = - browser()->profile()->GetExtensionsService()->extensions(); + browser()->profile()->GetExtensionService()->extensions(); UnloadExtension((*extensions->rbegin())->id()); { ResultCatcher catcher; diff --git a/chrome/browser/extensions/extension_page_actions_module.cc b/chrome/browser/extensions/extension_page_actions_module.cc index a37f662..0e26d60 100644 --- a/chrome/browser/extensions/extension_page_actions_module.cc +++ b/chrome/browser/extensions/extension_page_actions_module.cc @@ -8,7 +8,7 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/extensions/extension_page_actions_module_constants.h" #include "chrome/browser/extensions/extension_tabs_module.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/navigation_entry.h" #include "chrome/browser/tab_contents/tab_contents.h" diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc index e2fa67e..6eb2488 100644 --- a/chrome/browser/extensions/extension_process_manager.cc +++ b/chrome/browser/extensions/extension_process_manager.cc @@ -10,7 +10,7 @@ #include "chrome/browser/extensions/extension_host_mac.h" #endif #include "chrome/browser/extensions/extension_host.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/site_instance.h" #include "chrome/browser/renderer_host/render_view_host.h" @@ -135,8 +135,8 @@ ExtensionHost* ExtensionProcessManager::CreateView(const GURL& url, ViewType::Type view_type) { // A NULL browser may only be given for pop-up views. DCHECK(browser || (!browser && view_type == ViewType::EXTENSION_POPUP)); - ExtensionsService* service = - browsing_instance_->profile()->GetExtensionsService(); + ExtensionService* service = + browsing_instance_->profile()->GetExtensionService(); if (service) { const Extension* extension = service->GetExtensionByURL(url); if (extension) @@ -226,8 +226,8 @@ void ExtensionProcessManager::RegisterExtensionProcess( DCHECK(it == process_ids_.end()); process_ids_[extension_id] = process_id; - ExtensionsService* extension_service = - browsing_instance_->profile()->GetExtensionsService(); + ExtensionService* extension_service = + browsing_instance_->profile()->GetExtensionService(); std::vector<std::string> page_action_ids; const Extension* extension = @@ -281,13 +281,13 @@ void ExtensionProcessManager::Observe(NotificationType type, switch (type.value) { case NotificationType::EXTENSIONS_READY: { CreateBackgroundHosts(this, - Source<Profile>(source).ptr()->GetExtensionsService()->extensions()); + Source<Profile>(source).ptr()->GetExtensionService()->extensions()); break; } case NotificationType::EXTENSION_LOADED: { - ExtensionsService* service = - Source<Profile>(source).ptr()->GetExtensionsService(); + ExtensionService* service = + Source<Profile>(source).ptr()->GetExtensionService(); if (service->is_ready()) { const Extension* extension = Details<const Extension>(details).ptr(); ::CreateBackgroundHost(this, extension); @@ -427,8 +427,8 @@ RenderProcessHost* IncognitoExtensionProcessManager::GetExtensionProcess( const Extension* IncognitoExtensionProcessManager::GetExtensionOrAppByURL( const GURL& url) { - ExtensionsService* service = - browsing_instance_->profile()->GetExtensionsService(); + ExtensionService* service = + browsing_instance_->profile()->GetExtensionService(); if (!service) return NULL; return (url.SchemeIs(chrome::kExtensionScheme)) ? @@ -437,8 +437,8 @@ const Extension* IncognitoExtensionProcessManager::GetExtensionOrAppByURL( bool IncognitoExtensionProcessManager::IsIncognitoEnabled( const Extension* extension) { - ExtensionsService* service = - browsing_instance_->profile()->GetExtensionsService(); + ExtensionService* service = + browsing_instance_->profile()->GetExtensionService(); return service && service->IsIncognitoEnabled(extension); } @@ -456,8 +456,8 @@ void IncognitoExtensionProcessManager::Observe( // On Chrome OS, a login screen is implemented as a browser. // This browser has no extension service. In this case, // service will be NULL. - ExtensionsService* service = - browsing_instance_->profile()->GetExtensionsService(); + ExtensionService* service = + browsing_instance_->profile()->GetExtensionService(); if (service && service->is_ready()) CreateBackgroundHosts(this, service->extensions()); } diff --git a/chrome/browser/extensions/extension_proxy_api.cc b/chrome/browser/extensions/extension_proxy_api.cc index cb9d363..9bc33cb 100644 --- a/chrome/browser/extensions/extension_proxy_api.cc +++ b/chrome/browser/extensions/extension_proxy_api.cc @@ -8,7 +8,7 @@ #include "base/stringprintf.h" #include "base/values.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/common/pref_names.h" namespace { @@ -159,6 +159,6 @@ bool UseCustomProxySettingsFunction::ApplyProxyRules( void UseCustomProxySettingsFunction::SendNotification(const char* pref_path, Value* pref_value) { - profile()->GetExtensionsService()->extension_prefs() + profile()->GetExtensionService()->extension_prefs() ->SetExtensionControlledPref(extension_id(), pref_path, pref_value); } diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extension_service.cc index a2ccce5..16b66c4 100644 --- a/chrome/browser/extensions/extensions_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include <algorithm> @@ -170,27 +170,27 @@ PendingExtensionInfo::PendingExtensionInfo() install_source(Extension::INVALID) {} -ExtensionsService::ExtensionRuntimeData::ExtensionRuntimeData() +ExtensionService::ExtensionRuntimeData::ExtensionRuntimeData() : background_page_ready(false), being_upgraded(false) { } -ExtensionsService::ExtensionRuntimeData::~ExtensionRuntimeData() { +ExtensionService::ExtensionRuntimeData::~ExtensionRuntimeData() { } -// ExtensionsService. +// ExtensionService. -const char* ExtensionsService::kInstallDirectoryName = "Extensions"; -const char* ExtensionsService::kCurrentVersionFileName = "Current Version"; +const char* ExtensionService::kInstallDirectoryName = "Extensions"; +const char* ExtensionService::kCurrentVersionFileName = "Current Version"; -// Implements IO for the ExtensionsService. +// Implements IO for the ExtensionService. -class ExtensionsServiceBackend - : public base::RefCountedThreadSafe<ExtensionsServiceBackend>, +class ExtensionServiceBackend + : public base::RefCountedThreadSafe<ExtensionServiceBackend>, public ExternalExtensionProvider::Visitor { public: // |install_directory| is a path where to look for extensions to load. - ExtensionsServiceBackend(PrefService* prefs, + ExtensionServiceBackend(PrefService* prefs, const FilePath& install_directory); // Loads a single extension from |path| where |path| is the top directory of @@ -200,16 +200,16 @@ class ExtensionsServiceBackend // TODO(erikkay): It might be useful to be able to load a packed extension // (presumably into memory) without installing it. void LoadSingleExtension(const FilePath &path, - scoped_refptr<ExtensionsService> frontend); + scoped_refptr<ExtensionService> frontend); // Check externally updated extensions for updates and install if necessary. // Errors are reported through ExtensionErrorReporter. Succcess is not // reported. - void CheckForExternalUpdates(scoped_refptr<ExtensionsService> frontend); + void CheckForExternalUpdates(scoped_refptr<ExtensionService> frontend); // For the extension in |version_path| with |id|, check to see if it's an // externally managed extension. If so, tell the frontend to uninstall it. - void CheckExternalUninstall(scoped_refptr<ExtensionsService> frontend, + void CheckExternalUninstall(scoped_refptr<ExtensionService> frontend, const std::string& id); // Clear all ExternalExtensionProviders. @@ -233,9 +233,9 @@ class ExtensionsServiceBackend scoped_refptr<RefCountedList> forcelist); private: - friend class base::RefCountedThreadSafe<ExtensionsServiceBackend>; + friend class base::RefCountedThreadSafe<ExtensionServiceBackend>; - virtual ~ExtensionsServiceBackend(); + virtual ~ExtensionServiceBackend(); // Finish installing the extension in |crx_path| after it has been unpacked to // |unpacked_path|. If |expected_id| is not empty, it's verified against the @@ -255,7 +255,7 @@ class ExtensionsServiceBackend // This is a naked pointer which is set by each entry point. // The entry point is responsible for ensuring lifetime. - ExtensionsService* frontend_; + ExtensionService* frontend_; // The top-level extensions directory being installed to. FilePath install_directory_; @@ -277,10 +277,10 @@ class ExtensionsServiceBackend // if an update check is needed to install pending extensions. bool external_extension_added_; - DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); + DISALLOW_COPY_AND_ASSIGN(ExtensionServiceBackend); }; -ExtensionsServiceBackend::ExtensionsServiceBackend( +ExtensionServiceBackend::ExtensionServiceBackend( PrefService* prefs, const FilePath& install_directory) : frontend_(NULL), @@ -308,11 +308,11 @@ ExtensionsServiceBackend::ExtensionsServiceBackend( external_extension_providers_.push_back(external_policy_extension_provider_); } -ExtensionsServiceBackend::~ExtensionsServiceBackend() { +ExtensionServiceBackend::~ExtensionServiceBackend() { } -void ExtensionsServiceBackend::LoadSingleExtension( - const FilePath& path_in, scoped_refptr<ExtensionsService> frontend) { +void ExtensionServiceBackend::LoadSingleExtension( + const FilePath& path_in, scoped_refptr<ExtensionService> frontend) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); frontend_ = frontend; @@ -340,18 +340,18 @@ void ExtensionsServiceBackend::LoadSingleExtension( BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod(frontend_, - &ExtensionsService::OnExtensionInstalled, + &ExtensionService::OnExtensionInstalled, extension)); } -void ExtensionsServiceBackend::ReportExtensionLoadError( +void ExtensionServiceBackend::ReportExtensionLoadError( const FilePath& extension_path, const std::string &error) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( frontend_, - &ExtensionsService::ReportExtensionLoadError, extension_path, + &ExtensionService::ReportExtensionLoadError, extension_path, error, NotificationType::EXTENSION_INSTALL_ERROR, alert_on_error_)); } @@ -361,8 +361,8 @@ void ExtensionsServiceBackend::ReportExtensionLoadError( // (and also, on Windows, in the registry) and this code will periodically // check that location for a .crx file, which it will then install locally if // a new version is available. -void ExtensionsServiceBackend::CheckForExternalUpdates( - scoped_refptr<ExtensionsService> frontend) { +void ExtensionServiceBackend::CheckForExternalUpdates( + scoped_refptr<ExtensionService> frontend) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); // Note that this installation is intentionally silent (since it didn't @@ -391,8 +391,8 @@ void ExtensionsServiceBackend::CheckForExternalUpdates( } } -void ExtensionsServiceBackend::CheckExternalUninstall( - scoped_refptr<ExtensionsService> frontend, const std::string& id) { +void ExtensionServiceBackend::CheckExternalUninstall( + scoped_refptr<ExtensionService> frontend, const std::string& id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); // Check if the providers know about this extension. @@ -407,27 +407,27 @@ void ExtensionsServiceBackend::CheckExternalUninstall( BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - frontend.get(), &ExtensionsService::UninstallExtension, id, true)); + frontend.get(), &ExtensionService::UninstallExtension, id, true)); } -void ExtensionsServiceBackend::UpdateExternalPolicyExtensionProvider( +void ExtensionServiceBackend::UpdateExternalPolicyExtensionProvider( scoped_refptr<RefCountedList> forcelist) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); external_policy_extension_provider_->SetPreferences(forcelist->Get()); } -void ExtensionsServiceBackend::ClearProvidersForTesting() { +void ExtensionServiceBackend::ClearProvidersForTesting() { external_extension_providers_.clear(); } -void ExtensionsServiceBackend::AddProviderForTesting( +void ExtensionServiceBackend::AddProviderForTesting( ExternalExtensionProvider* test_provider) { DCHECK(test_provider); external_extension_providers_.push_back( linked_ptr<ExternalExtensionProvider>(test_provider)); } -void ExtensionsServiceBackend::OnExternalExtensionFileFound( +void ExtensionServiceBackend::OnExternalExtensionFileFound( const std::string& id, const Version* version, const FilePath& path, Extension::Location location) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); @@ -436,11 +436,11 @@ void ExtensionsServiceBackend::OnExternalExtensionFileFound( BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - frontend_, &ExtensionsService::OnExternalExtensionFileFound, id, + frontend_, &ExtensionService::OnExternalExtensionFileFound, id, version->GetString(), path, location)); } -void ExtensionsServiceBackend::OnExternalExtensionUpdateUrlFound( +void ExtensionServiceBackend::OnExternalExtensionUpdateUrlFound( const std::string& id, const GURL& update_url, Extension::Location location) { @@ -455,12 +455,12 @@ void ExtensionsServiceBackend::OnExternalExtensionUpdateUrlFound( BrowserThread::UI, FROM_HERE, NewRunnableMethod( frontend_, - &ExtensionsService::AddPendingExtensionFromExternalUpdateUrl, + &ExtensionService::AddPendingExtensionFromExternalUpdateUrl, id, update_url, location)); external_extension_added_ |= true; } -bool ExtensionsService::IsDownloadFromGallery(const GURL& download_url, +bool ExtensionService::IsDownloadFromGallery(const GURL& download_url, const GURL& referrer_url) { // Special-case the themes mini-gallery. // TODO(erikkay) When that gallery goes away, remove this code. @@ -509,13 +509,13 @@ bool ExtensionsService::IsDownloadFromGallery(const GURL& download_url, return (referrer_valid && download_valid); } -bool ExtensionsService::IsDownloadFromMiniGallery(const GURL& download_url) { +bool ExtensionService::IsDownloadFromMiniGallery(const GURL& download_url) { return StartsWithASCII(download_url.spec(), extension_urls::kMiniGalleryDownloadPrefix, false); // case_sensitive } -bool ExtensionsService::IsInstalledApp(const GURL& url) { +bool ExtensionService::IsInstalledApp(const GURL& url) { // Check for hosted app. if (GetExtensionByWebExtent(url) != NULL) return true; @@ -526,8 +526,8 @@ bool ExtensionsService::IsInstalledApp(const GURL& url) { } // static -bool ExtensionsService::UninstallExtensionHelper( - ExtensionsService* extensions_service, +bool ExtensionService::UninstallExtensionHelper( + ExtensionService* extensions_service, const std::string& extension_id) { DCHECK(extensions_service); @@ -544,7 +544,7 @@ bool ExtensionsService::UninstallExtensionHelper( return true; } -ExtensionsService::ExtensionsService(Profile* profile, +ExtensionService::ExtensionService(Profile* profile, const CommandLine* command_line, const FilePath& install_directory, ExtensionPrefs* extension_prefs, @@ -587,7 +587,7 @@ ExtensionsService::ExtensionsService(Profile* profile, update_frequency); } - backend_ = new ExtensionsServiceBackend(profile->GetPrefs(), + backend_ = new ExtensionServiceBackend(profile->GetPrefs(), install_directory_); // Use monochrome icons for Omnibox icons. @@ -597,23 +597,23 @@ ExtensionsService::ExtensionsService(Profile* profile, 0, kOmniboxIconPaddingRight)); } -const ExtensionList* ExtensionsService::extensions() const { +const ExtensionList* ExtensionService::extensions() const { return &extensions_; } -const ExtensionList* ExtensionsService::disabled_extensions() const { +const ExtensionList* ExtensionService::disabled_extensions() const { return &disabled_extensions_; } -const PendingExtensionMap& ExtensionsService::pending_extensions() const { +const PendingExtensionMap& ExtensionService::pending_extensions() const { return pending_extensions_; } -bool ExtensionsService::HasInstalledExtensions() { +bool ExtensionService::HasInstalledExtensions() { return !(extensions_.empty() && disabled_extensions_.empty()); } -ExtensionsService::~ExtensionsService() { +ExtensionService::~ExtensionService() { DCHECK(!profile_); // Profile should have told us it's going away. UnloadAllExtensions(); if (updater_.get()) { @@ -621,7 +621,7 @@ ExtensionsService::~ExtensionsService() { } } -void ExtensionsService::InitEventRouters() { +void ExtensionService::InitEventRouters() { if (event_routers_initialized_) return; @@ -637,12 +637,12 @@ void ExtensionsService::InitEventRouters() { event_routers_initialized_ = true; } -const Extension* ExtensionsService::GetExtensionById(const std::string& id, +const Extension* ExtensionService::GetExtensionById(const std::string& id, bool include_disabled) { return GetExtensionByIdInternal(id, true, include_disabled); } -void ExtensionsService::Init() { +void ExtensionService::Init() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(!ready_); // Can't redo init. @@ -662,7 +662,7 @@ void ExtensionsService::Init() { GarbageCollectExtensions(); } -void ExtensionsService::InstallExtension(const FilePath& extension_path) { +void ExtensionService::InstallExtension(const FilePath& extension_path) { scoped_refptr<CrxInstaller> installer( new CrxInstaller(this, // frontend NULL)); // no client (silent install) @@ -678,7 +678,7 @@ namespace { } } // namespace -void ExtensionsService::UpdateExtension(const std::string& id, +void ExtensionService::UpdateExtension(const std::string& id, const FilePath& extension_path, const GURL& download_url) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); @@ -717,7 +717,7 @@ void ExtensionsService::UpdateExtension(const std::string& id, installer->InstallCrx(extension_path); } -void ExtensionsService::AddPendingExtensionFromSync( +void ExtensionService::AddPendingExtensionFromSync( const std::string& id, const GURL& update_url, PendingExtensionInfo::ExpectedCrxType expected_crx_type, bool install_silently, bool enable_on_install, @@ -734,7 +734,7 @@ void ExtensionsService::AddPendingExtensionFromSync( Extension::INTERNAL); } -void ExtensionsService::AddPendingExtensionFromExternalUpdateUrl( +void ExtensionService::AddPendingExtensionFromExternalUpdateUrl( const std::string& id, const GURL& update_url, Extension::Location location) { // Add the extension to this list of extensions to update. @@ -759,7 +759,7 @@ void ExtensionsService::AddPendingExtensionFromExternalUpdateUrl( location); } -void ExtensionsService::AddPendingExtensionFromDefaultAppList( +void ExtensionService::AddPendingExtensionFromDefaultAppList( const std::string& id) { // Add the extension to this list of extensions to update. const PendingExtensionInfo::ExpectedCrxType kExpectedCrxType = @@ -780,7 +780,7 @@ void ExtensionsService::AddPendingExtensionFromDefaultAppList( Extension::INTERNAL); } -void ExtensionsService::AddPendingExtensionInternal( +void ExtensionService::AddPendingExtensionInternal( const std::string& id, const GURL& update_url, PendingExtensionInfo::ExpectedCrxType expected_crx_type, bool is_from_sync, bool install_silently, @@ -812,7 +812,7 @@ void ExtensionsService::AddPendingExtensionInternal( enable_incognito_on_install, install_source); } -void ExtensionsService::ReloadExtension(const std::string& extension_id) { +void ExtensionService::ReloadExtension(const std::string& extension_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); FilePath path; const Extension* current_extension = GetExtensionById(extension_id, false); @@ -855,7 +855,7 @@ void ExtensionsService::ReloadExtension(const std::string& extension_id) { } } -void ExtensionsService::UninstallExtension(const std::string& extension_id, +void ExtensionService::UninstallExtension(const std::string& extension_id, bool external_uninstall) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); @@ -907,13 +907,13 @@ void ExtensionsService::UninstallExtension(const std::string& extension_id, Details<UninstalledExtensionInfo>(&uninstalled_extension_info)); } -void ExtensionsService::ClearExtensionData(const GURL& extension_url) { +void ExtensionService::ClearExtensionData(const GURL& extension_url) { scoped_refptr<ExtensionDataDeleter> deleter( new ExtensionDataDeleter(profile_, extension_url)); deleter->StartDeleting(); } -void ExtensionsService::EnableExtension(const std::string& extension_id) { +void ExtensionService::EnableExtension(const std::string& extension_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); const Extension* extension = @@ -940,7 +940,7 @@ void ExtensionsService::EnableExtension(const std::string& extension_id) { UpdateActiveExtensionsInCrashReporter(); } -void ExtensionsService::DisableExtension(const std::string& extension_id) { +void ExtensionService::DisableExtension(const std::string& extension_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); const Extension* extension = @@ -965,7 +965,7 @@ void ExtensionsService::DisableExtension(const std::string& extension_id) { UpdateActiveExtensionsInCrashReporter(); } -void ExtensionsService::GrantPermissions(const Extension* extension) { +void ExtensionService::GrantPermissions(const Extension* extension) { CHECK(extension); // We only maintain the granted permissions prefs for INTERNAL extensions. @@ -978,7 +978,7 @@ void ExtensionsService::GrantPermissions(const Extension* extension) { effective_hosts); } -void ExtensionsService::GrantPermissionsAndEnableExtension( +void ExtensionService::GrantPermissionsAndEnableExtension( const Extension* extension) { CHECK(extension); GrantPermissions(extension); @@ -986,16 +986,16 @@ void ExtensionsService::GrantPermissionsAndEnableExtension( EnableExtension(extension->id()); } -void ExtensionsService::LoadExtension(const FilePath& extension_path) { +void ExtensionService::LoadExtension(const FilePath& extension_path) { BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( backend_.get(), - &ExtensionsServiceBackend::LoadSingleExtension, - extension_path, scoped_refptr<ExtensionsService>(this))); + &ExtensionServiceBackend::LoadSingleExtension, + extension_path, scoped_refptr<ExtensionService>(this))); } -void ExtensionsService::LoadComponentExtensions() { +void ExtensionService::LoadComponentExtensions() { for (RegisteredComponentExtensions::iterator it = component_extension_manifests_.begin(); it != component_extension_manifests_.end(); ++it) { @@ -1022,7 +1022,7 @@ void ExtensionsService::LoadComponentExtensions() { } } -void ExtensionsService::LoadAllExtensions() { +void ExtensionService::LoadAllExtensions() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); base::TimeTicks start_time = base::TimeTicks::Now(); @@ -1163,7 +1163,7 @@ void ExtensionsService::LoadAllExtensions() { browser_action_count); } -void ExtensionsService::LoadInstalledExtension(const ExtensionInfo& info, +void ExtensionService::LoadInstalledExtension(const ExtensionInfo& info, bool write_to_prefs) { std::string error; scoped_refptr<const Extension> extension(NULL); @@ -1196,13 +1196,13 @@ void ExtensionsService::LoadInstalledExtension(const ExtensionInfo& info, BrowserThread::FILE, FROM_HERE, NewRunnableMethod( backend_.get(), - &ExtensionsServiceBackend::CheckExternalUninstall, - scoped_refptr<ExtensionsService>(this), + &ExtensionServiceBackend::CheckExternalUninstall, + scoped_refptr<ExtensionService>(this), info.extension_id)); } } -void ExtensionsService::NotifyExtensionLoaded(const Extension* extension) { +void ExtensionService::NotifyExtensionLoaded(const Extension* extension) { // The ChromeURLRequestContexts need to be first to know that the extension // was loaded, otherwise a race can arise where a renderer that is created // for the extension may try to load an extension URL with an extension id @@ -1228,7 +1228,7 @@ void ExtensionsService::NotifyExtensionLoaded(const Extension* extension) { Details<const Extension>(extension)); } -void ExtensionsService::NotifyExtensionUnloaded(const Extension* extension) { +void ExtensionService::NotifyExtensionUnloaded(const Extension* extension) { NotificationService::current()->Notify( NotificationType::EXTENSION_UNLOADED, Source<Profile>(profile_), @@ -1248,7 +1248,7 @@ void ExtensionsService::NotifyExtensionUnloaded(const Extension* extension) { } } -void ExtensionsService::GrantProtectedStorage(const Extension* extension) { +void ExtensionService::GrantProtectedStorage(const Extension* extension) { DCHECK(extension->is_app()) << "Only Apps are allowed protected storage."; std::vector<GURL> origins; GetExplicitOriginsInExtent(extension, &origins); @@ -1256,7 +1256,7 @@ void ExtensionsService::GrantProtectedStorage(const Extension* extension) { ++protected_storage_map_[origins[i]]; } -void ExtensionsService::RevokeProtectedStorage(const Extension* extension) { +void ExtensionService::RevokeProtectedStorage(const Extension* extension) { DCHECK(extension->is_app()) << "Attempting to revoke protected storage from " << " a non-app extension."; std::vector<GURL> origins; @@ -1269,7 +1269,7 @@ void ExtensionsService::RevokeProtectedStorage(const Extension* extension) { } } -void ExtensionsService::GrantUnlimitedStorage(const Extension* extension) { +void ExtensionService::GrantUnlimitedStorage(const Extension* extension) { DCHECK(extension->HasApiPermission(Extension::kUnlimitedStoragePermission)); std::vector<GURL> origins; GetExplicitOriginsInExtent(extension, &origins); @@ -1304,7 +1304,7 @@ void ExtensionsService::GrantUnlimitedStorage(const Extension* extension) { } } -void ExtensionsService::RevokeUnlimitedStorage(const Extension* extension) { +void ExtensionService::RevokeUnlimitedStorage(const Extension* extension) { DCHECK(extension->HasApiPermission(Extension::kUnlimitedStoragePermission)); std::vector<GURL> origins; GetExplicitOriginsInExtent(extension, &origins); @@ -1339,7 +1339,7 @@ void ExtensionsService::RevokeUnlimitedStorage(const Extension* extension) { } } -void ExtensionsService::UpdateExtensionBlacklist( +void ExtensionService::UpdateExtensionBlacklist( const std::vector<std::string>& blacklist) { // Use this set to indicate if an extension in the blacklist has been used. std::set<std::string> blacklist_set; @@ -1366,17 +1366,17 @@ void ExtensionsService::UpdateExtensionBlacklist( } } -void ExtensionsService::DestroyingProfile() { +void ExtensionService::DestroyingProfile() { pref_change_registrar_.RemoveAll(); profile_ = NULL; toolbar_model_.DestroyingProfile(); } -ExtensionPrefs* ExtensionsService::extension_prefs() { +ExtensionPrefs* ExtensionService::extension_prefs() { return extension_prefs_; } -void ExtensionsService::CheckAdminBlacklist() { +void ExtensionService::CheckAdminBlacklist() { std::vector<std::string> to_be_removed; // Loop through extensions list, unload installed extensions. for (ExtensionList::const_iterator iter = extensions_.begin(); @@ -1392,7 +1392,7 @@ void ExtensionsService::CheckAdminBlacklist() { UnloadExtension(to_be_removed[i]); } -bool ExtensionsService::IsIncognitoEnabled(const Extension* extension) { +bool ExtensionService::IsIncognitoEnabled(const Extension* extension) { // If this is a component extension we always allow it to work in incognito // mode. if (extension->location() == Extension::COMPONENT) @@ -1402,7 +1402,7 @@ bool ExtensionsService::IsIncognitoEnabled(const Extension* extension) { return extension_prefs_->IsIncognitoEnabled(extension->id()); } -void ExtensionsService::SetIsIncognitoEnabled(const Extension* extension, +void ExtensionService::SetIsIncognitoEnabled(const Extension* extension, bool enabled) { extension_prefs_->SetIsIncognitoEnabled(extension->id(), enabled); @@ -1416,20 +1416,20 @@ void ExtensionsService::SetIsIncognitoEnabled(const Extension* extension, } } -bool ExtensionsService::CanCrossIncognito(const Extension* extension) { +bool ExtensionService::CanCrossIncognito(const Extension* extension) { // We allow the extension to see events and data from another profile iff it // uses "spanning" behavior and it has incognito access. "split" mode // extensions only see events for a matching profile. return IsIncognitoEnabled(extension) && !extension->incognito_split_mode(); } -bool ExtensionsService::AllowFileAccess(const Extension* extension) { +bool ExtensionService::AllowFileAccess(const Extension* extension) { return (CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableExtensionsFileAccessCheck) || extension_prefs_->AllowFileAccess(extension->id())); } -void ExtensionsService::SetAllowFileAccess(const Extension* extension, +void ExtensionService::SetAllowFileAccess(const Extension* extension, bool allow) { extension_prefs_->SetAllowFileAccess(extension->id(), allow); NotificationService::current()->Notify( @@ -1438,24 +1438,24 @@ void ExtensionsService::SetAllowFileAccess(const Extension* extension, Details<const Extension>(extension)); } -bool ExtensionsService::GetBrowserActionVisibility(const Extension* extension) { +bool ExtensionService::GetBrowserActionVisibility(const Extension* extension) { return extension_prefs_->GetBrowserActionVisibility(extension); } -void ExtensionsService::SetBrowserActionVisibility(const Extension* extension, +void ExtensionService::SetBrowserActionVisibility(const Extension* extension, bool visible) { extension_prefs_->SetBrowserActionVisibility(extension, visible); } -void ExtensionsService::CheckForExternalUpdates() { +void ExtensionService::CheckForExternalUpdates() { BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( - backend_.get(), &ExtensionsServiceBackend::CheckForExternalUpdates, - scoped_refptr<ExtensionsService>(this))); + backend_.get(), &ExtensionServiceBackend::CheckForExternalUpdates, + scoped_refptr<ExtensionService>(this))); } -void ExtensionsService::UpdateExternalPolicyExtensionProvider() { +void ExtensionService::UpdateExternalPolicyExtensionProvider() { const ListValue* list_pref = profile_->GetPrefs()->GetList(prefs::kExtensionInstallForceList); ListValue* list_copy = NULL; @@ -1465,12 +1465,12 @@ void ExtensionsService::UpdateExternalPolicyExtensionProvider() { BrowserThread::FILE, FROM_HERE, NewRunnableMethod( backend_.get(), - &ExtensionsServiceBackend::UpdateExternalPolicyExtensionProvider, + &ExtensionServiceBackend::UpdateExternalPolicyExtensionProvider, scoped_refptr<RefCountedList>( new RefCountedList(list_copy)))); } -void ExtensionsService::UnloadExtension(const std::string& extension_id) { +void ExtensionService::UnloadExtension(const std::string& extension_id) { // Make sure the extension gets deleted after we return from this function. scoped_refptr<const Extension> extension( GetExtensionByIdInternal(extension_id, true, true)); @@ -1514,7 +1514,7 @@ void ExtensionsService::UnloadExtension(const std::string& extension_id) { UpdateActiveExtensionsInCrashReporter(); } -void ExtensionsService::UnloadAllExtensions() { +void ExtensionService::UnloadAllExtensions() { extensions_.clear(); disabled_extensions_.clear(); extension_runtime_data_.clear(); @@ -1524,12 +1524,12 @@ void ExtensionsService::UnloadAllExtensions() { // or uninstalled, and UnloadAll is just part of shutdown. } -void ExtensionsService::ReloadExtensions() { +void ExtensionService::ReloadExtensions() { UnloadAllExtensions(); LoadAllExtensions(); } -void ExtensionsService::GarbageCollectExtensions() { +void ExtensionService::GarbageCollectExtensions() { if (extension_prefs_->pref_service()->ReadOnly()) return; @@ -1554,7 +1554,7 @@ void ExtensionsService::GarbageCollectExtensions() { } } -void ExtensionsService::OnLoadedInstalledExtensions() { +void ExtensionService::OnLoadedInstalledExtensions() { if (updater_.get()) { updater_->Start(); } @@ -1566,7 +1566,7 @@ void ExtensionsService::OnLoadedInstalledExtensions() { NotificationService::NoDetails()); } -void ExtensionsService::OnExtensionLoaded(const Extension* extension) { +void ExtensionService::OnExtensionLoaded(const Extension* extension) { // Ensure extension is deleted unless we transfer ownership. scoped_refptr<const Extension> scoped_extension(extension); @@ -1626,7 +1626,7 @@ void ExtensionsService::OnExtensionLoaded(const Extension* extension) { } } -void ExtensionsService::DisableIfPrivilegeIncrease(const Extension* extension) { +void ExtensionService::DisableIfPrivilegeIncrease(const Extension* extension) { // We keep track of all permissions the user has granted each extension. // This allows extensions to gracefully support backwards compatibility // by including unknown permissions in their manifests. When the user @@ -1708,7 +1708,7 @@ void ExtensionsService::DisableIfPrivilegeIncrease(const Extension* extension) { } } -void ExtensionsService::UpdateActiveExtensionsInCrashReporter() { +void ExtensionService::UpdateActiveExtensionsInCrashReporter() { std::set<std::string> extension_ids; for (size_t i = 0; i < extensions_.size(); ++i) { if (!extensions_[i]->is_theme() && @@ -1719,7 +1719,7 @@ void ExtensionsService::UpdateActiveExtensionsInCrashReporter() { child_process_logging::SetActiveExtensions(extension_ids); } -void ExtensionsService::OnExtensionInstalled(const Extension* extension) { +void ExtensionService::OnExtensionInstalled(const Extension* extension) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // Ensure extension is deleted unless we transfer ownership. @@ -1864,7 +1864,7 @@ void ExtensionsService::OnExtensionInstalled(const Extension* extension) { OnExtensionLoaded(scoped_extension); } -const Extension* ExtensionsService::GetExtensionByIdInternal( +const Extension* ExtensionService::GetExtensionByIdInternal( const std::string& id, bool include_enabled, bool include_disabled) { std::string lowercase_id = StringToLowerASCII(id); if (include_enabled) { @@ -1884,16 +1884,16 @@ const Extension* ExtensionsService::GetExtensionByIdInternal( return NULL; } -const Extension* ExtensionsService::GetWebStoreApp() { +const Extension* ExtensionService::GetWebStoreApp() { return GetExtensionById(extension_misc::kWebStoreAppId, false); } -const Extension* ExtensionsService::GetExtensionByURL(const GURL& url) { +const Extension* ExtensionService::GetExtensionByURL(const GURL& url) { return url.scheme() != chrome::kExtensionScheme ? NULL : GetExtensionById(url.host(), false); } -const Extension* ExtensionsService::GetExtensionByWebExtent(const GURL& url) { +const Extension* ExtensionService::GetExtensionByWebExtent(const GURL& url) { for (size_t i = 0; i < extensions_.size(); ++i) { if (extensions_[i]->web_extent().ContainsURL(url)) return extensions_[i]; @@ -1901,7 +1901,7 @@ const Extension* ExtensionsService::GetExtensionByWebExtent(const GURL& url) { return NULL; } -bool ExtensionsService::ExtensionBindingsAllowed(const GURL& url) { +bool ExtensionService::ExtensionBindingsAllowed(const GURL& url) { // Allow bindings for all packaged extension. if (GetExtensionByURL(url)) return true; @@ -1911,7 +1911,7 @@ bool ExtensionsService::ExtensionBindingsAllowed(const GURL& url) { return (extension && extension->location() == Extension::COMPONENT); } -const Extension* ExtensionsService::GetExtensionByOverlappingWebExtent( +const Extension* ExtensionService::GetExtensionByOverlappingWebExtent( const ExtensionExtent& extent) { for (size_t i = 0; i < extensions_.size(); ++i) { if (extensions_[i]->web_extent().OverlapsWith(extent)) @@ -1921,33 +1921,33 @@ const Extension* ExtensionsService::GetExtensionByOverlappingWebExtent( return NULL; } -const SkBitmap& ExtensionsService::GetOmniboxIcon( +const SkBitmap& ExtensionService::GetOmniboxIcon( const std::string& extension_id) { return omnibox_icon_manager_.GetIcon(extension_id); } -const SkBitmap& ExtensionsService::GetOmniboxPopupIcon( +const SkBitmap& ExtensionService::GetOmniboxPopupIcon( const std::string& extension_id) { return omnibox_popup_icon_manager_.GetIcon(extension_id); } -void ExtensionsService::ClearProvidersForTesting() { +void ExtensionService::ClearProvidersForTesting() { BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( - backend_.get(), &ExtensionsServiceBackend::ClearProvidersForTesting)); + backend_.get(), &ExtensionServiceBackend::ClearProvidersForTesting)); } -void ExtensionsService::AddProviderForTesting( +void ExtensionService::AddProviderForTesting( ExternalExtensionProvider* test_provider) { BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( - backend_.get(), &ExtensionsServiceBackend::AddProviderForTesting, + backend_.get(), &ExtensionServiceBackend::AddProviderForTesting, test_provider)); } -void ExtensionsService::OnExternalExtensionFileFound( +void ExtensionService::OnExternalExtensionFileFound( const std::string& id, const std::string& version, const FilePath& path, @@ -2000,7 +2000,7 @@ void ExtensionsService::OnExternalExtensionFileFound( installer->InstallCrx(path); } -void ExtensionsService::ReportExtensionLoadError( +void ExtensionService::ReportExtensionLoadError( const FilePath& extension_path, const std::string &error, NotificationType type, @@ -2018,7 +2018,7 @@ void ExtensionsService::ReportExtensionLoadError( ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy); } -void ExtensionsService::DidCreateRenderViewForBackgroundPage( +void ExtensionService::DidCreateRenderViewForBackgroundPage( ExtensionHost* host) { OrphanedDevTools::iterator iter = orphaned_dev_tools_.find(host->extension()->id()); @@ -2030,7 +2030,7 @@ void ExtensionsService::DidCreateRenderViewForBackgroundPage( orphaned_dev_tools_.erase(iter); } -void ExtensionsService::Observe(NotificationType type, +void ExtensionService::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { switch (type.value) { @@ -2045,7 +2045,7 @@ void ExtensionsService::Observe(NotificationType type, // We do it in a PostTask so that other handlers of this notification will // still have access to the Extension and ExtensionHost. MessageLoop::current()->PostTask(FROM_HERE, - NewRunnableMethod(this, &ExtensionsService::UnloadExtension, + NewRunnableMethod(this, &ExtensionService::UnloadExtension, host->extension()->id())); break; } @@ -2072,11 +2072,11 @@ void ExtensionsService::Observe(NotificationType type, } } -bool ExtensionsService::HasApps() const { +bool ExtensionService::HasApps() const { return !GetAppIds().empty(); } -ExtensionIdSet ExtensionsService::GetAppIds() const { +ExtensionIdSet ExtensionService::GetAppIds() const { ExtensionIdSet result; for (ExtensionList::const_iterator it = extensions_.begin(); it != extensions_.end(); ++it) { @@ -2087,12 +2087,12 @@ ExtensionIdSet ExtensionsService::GetAppIds() const { return result; } -bool ExtensionsService::IsBackgroundPageReady(const Extension* extension) { +bool ExtensionService::IsBackgroundPageReady(const Extension* extension) { return (extension->background_url().is_empty() || extension_runtime_data_[extension->id()].background_page_ready); } -void ExtensionsService::SetBackgroundPageReady(const Extension* extension) { +void ExtensionService::SetBackgroundPageReady(const Extension* extension) { DCHECK(!extension->background_url().is_empty()); extension_runtime_data_[extension->id()].background_page_ready = true; NotificationService::current()->Notify( @@ -2101,15 +2101,15 @@ void ExtensionsService::SetBackgroundPageReady(const Extension* extension) { NotificationService::NoDetails()); } -bool ExtensionsService::IsBeingUpgraded(const Extension* extension) { +bool ExtensionService::IsBeingUpgraded(const Extension* extension) { return extension_runtime_data_[extension->id()].being_upgraded; } -void ExtensionsService::SetBeingUpgraded(const Extension* extension, +void ExtensionService::SetBeingUpgraded(const Extension* extension, bool value) { extension_runtime_data_[extension->id()].being_upgraded = value; } -PropertyBag* ExtensionsService::GetPropertyBag(const Extension* extension) { +PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { return &extension_runtime_data_[extension->id()].property_bag; } diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extension_service.h index 68f7bce..defa10a 100644 --- a/chrome/browser/extensions/extensions_service.h +++ b/chrome/browser/extensions/extension_service.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ -#define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ +#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ #pragma once #include <map> @@ -34,7 +34,7 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/property_bag.h" -class ExtensionsServiceBackend; +class ExtensionServiceBackend; class ExtensionToolbarModel; class ExtensionUpdater; class GURL; @@ -80,7 +80,7 @@ struct PendingExtensionInfo { typedef std::map<std::string, PendingExtensionInfo> PendingExtensionMap; // This is an interface class to encapsulate the dependencies that -// ExtensionUpdater has on ExtensionsService. This allows easy mocking. +// ExtensionUpdater has on ExtensionService. This allows easy mocking. class ExtensionUpdateService { public: virtual ~ExtensionUpdateService() {} @@ -99,8 +99,8 @@ class ExtensionUpdateService { }; // Manages installed and running Chromium extensions. -class ExtensionsService - : public base::RefCountedThreadSafe<ExtensionsService, +class ExtensionService + : public base::RefCountedThreadSafe<ExtensionService, BrowserThread::DeleteOnUIThread>, public ExtensionUpdateService, public NotificationObserver { @@ -114,7 +114,7 @@ class ExtensionsService } // The extension's manifest. This is required for component extensions so - // that ExtensionsService doesn't need to go to disk to load them. + // that ExtensionService doesn't need to go to disk to load them. std::string manifest; // Directory where the extension is stored. @@ -146,12 +146,12 @@ class ExtensionsService // Attempts to uninstall an extension from a given ExtensionService. Returns // true iff the target extension exists. - static bool UninstallExtensionHelper(ExtensionsService* extensions_service, + static bool UninstallExtensionHelper(ExtensionService* extensions_service, const std::string& extension_id); // Constructor stores pointers to |profile| and |extension_prefs| but // ownership remains at caller. - ExtensionsService(Profile* profile, + ExtensionService(Profile* profile, const CommandLine* command_line, const FilePath& install_directory, ExtensionPrefs* extension_prefs, @@ -418,7 +418,7 @@ class ExtensionsService } // Notify the frontend that there was an error loading an extension. - // This method is public because ExtensionsServiceBackend can post to here. + // This method is public because ExtensionServiceBackend can post to here. void ReportExtensionLoadError(const FilePath& extension_path, const std::string& error, NotificationType type, @@ -441,7 +441,7 @@ class ExtensionsService private: friend class BrowserThread; - friend class DeleteTask<ExtensionsService>; + friend class DeleteTask<ExtensionService>; // Contains Extension data that can change during the life of the process, // but does not persist across restarts. @@ -460,7 +460,7 @@ class ExtensionsService }; typedef std::map<std::string, ExtensionRuntimeData> ExtensionRuntimeDataMap; - virtual ~ExtensionsService(); + virtual ~ExtensionService(); // Clear all persistent data that may have been stored by the extension. void ClearExtensionData(const GURL& extension_url); @@ -498,7 +498,7 @@ class ExtensionsService void GrantUnlimitedStorage(const Extension* extension); void RevokeUnlimitedStorage(const Extension* extension); - // The profile this ExtensionsService is part of. + // The profile this ExtensionService is part of. Profile* profile_; // Preferences for the owning profile (weak reference). @@ -526,7 +526,7 @@ class ExtensionsService bool show_extensions_prompts_; // The backend that will do IO on behalf of this instance. - scoped_refptr<ExtensionsServiceBackend> backend_; + scoped_refptr<ExtensionServiceBackend> backend_; // Used by dispatchers to limit API quota for individual extensions. ExtensionsQuotaService quota_service_; @@ -591,13 +591,13 @@ class ExtensionsService // Flag to make sure event routers are only initialized once. bool event_routers_initialized_; - FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, + FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, UpdatePendingExtensionAlreadyInstalled); - FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, + FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, InstallAppsWithUnlimtedStorage); - FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, + FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, InstallAppsAndCheckStorageProtection); - DISALLOW_COPY_AND_ASSIGN(ExtensionsService); + DISALLOW_COPY_AND_ASSIGN(ExtensionService); }; -#endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ diff --git a/chrome/browser/extensions/extensions_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index 80ed848..b9de0f8 100644 --- a/chrome/browser/extensions/extensions_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/extensions_service_unittest.h" +#include "chrome/browser/extensions/extension_service_unittest.h" #include <algorithm> #include <vector> @@ -26,7 +26,7 @@ #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_creator.h" #include "chrome/browser/extensions/extension_error_reporter.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/external_extension_provider.h" #include "chrome/browser/extensions/external_pref_extension_provider.h" #include "chrome/browser/extensions/pack_extension_job.cc" @@ -298,10 +298,10 @@ class ExtensionTestingProfile : public TestingProfile { ExtensionTestingProfile() : service_(NULL) { } - void set_extensions_service(ExtensionsService* service) { + void set_extensions_service(ExtensionService* service) { service_ = service; } - virtual ExtensionsService* GetExtensionsService() { return service_; } + virtual ExtensionService* GetExtensionService() { return service_; } virtual ChromeAppCacheService* GetAppCacheService() { if (!appcache_service_) { @@ -324,13 +324,13 @@ class ExtensionTestingProfile : public TestingProfile { } private: - ExtensionsService* service_; + ExtensionService* service_; scoped_refptr<ChromeAppCacheService> appcache_service_; scoped_refptr<fileapi::SandboxedFileSystemContext> file_system_context_; }; // Our message loop may be used in tests which require it to be an IO loop. -ExtensionsServiceTestBase::ExtensionsServiceTestBase() +ExtensionServiceTestBase::ExtensionServiceTestBase() : total_successes_(0), loop_(MessageLoop::TYPE_IO), ui_thread_(BrowserThread::UI, &loop_), @@ -340,8 +340,8 @@ ExtensionsServiceTestBase::ExtensionsServiceTestBase() io_thread_(BrowserThread::IO, &loop_) { } -ExtensionsServiceTestBase::~ExtensionsServiceTestBase() { - // Drop our reference to ExtensionsService and TestingProfile, so that they +ExtensionServiceTestBase::~ExtensionServiceTestBase() { + // Drop our reference to ExtensionService and TestingProfile, so that they // can be destroyed while BrowserThreads and MessageLoop are still around // (they are used in the destruction process). service_ = NULL; @@ -349,7 +349,7 @@ ExtensionsServiceTestBase::~ExtensionsServiceTestBase() { MessageLoop::current()->RunAllPending(); } -void ExtensionsServiceTestBase::InitializeExtensionsService( +void ExtensionServiceTestBase::InitializeExtensionService( const FilePath& pref_file, const FilePath& extensions_install_dir) { ExtensionTestingProfile* profile = new ExtensionTestingProfile(); // Create a PrefService that only contains user defined preference values. @@ -361,7 +361,7 @@ void ExtensionsServiceTestBase::InitializeExtensionsService( profile_.reset(profile); - service_ = profile->CreateExtensionsService( + service_ = profile->CreateExtensionService( CommandLine::ForCurrentProcess(), extensions_install_dir); service_->set_extensions_enabled(true); @@ -378,7 +378,7 @@ void ExtensionsServiceTestBase::InitializeExtensionsService( total_successes_ = 0; } -void ExtensionsServiceTestBase::InitializeInstalledExtensionsService( +void ExtensionServiceTestBase::InitializeInstalledExtensionService( const FilePath& prefs_file, const FilePath& source_install_dir) { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); FilePath path_ = temp_dir_.path(); @@ -392,10 +392,10 @@ void ExtensionsServiceTestBase::InitializeInstalledExtensionsService( file_util::Delete(extensions_install_dir_, true); file_util::CopyDirectory(source_install_dir, extensions_install_dir_, true); - InitializeExtensionsService(temp_prefs, extensions_install_dir_); + InitializeExtensionService(temp_prefs, extensions_install_dir_); } -void ExtensionsServiceTestBase::InitializeEmptyExtensionsService() { +void ExtensionServiceTestBase::InitializeEmptyExtensionService() { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); FilePath path_ = temp_dir_.path(); path_ = path_.Append(FILE_PATH_LITERAL("TestingExtensionsPath")); @@ -407,22 +407,22 @@ void ExtensionsServiceTestBase::InitializeEmptyExtensionsService() { file_util::Delete(extensions_install_dir_, true); file_util::CreateDirectory(extensions_install_dir_); - InitializeExtensionsService(prefs_filename, extensions_install_dir_); + InitializeExtensionService(prefs_filename, extensions_install_dir_); } // static -void ExtensionsServiceTestBase::SetUpTestCase() { +void ExtensionServiceTestBase::SetUpTestCase() { ExtensionErrorReporter::Init(false); // no noisy errors } -void ExtensionsServiceTestBase::SetUp() { +void ExtensionServiceTestBase::SetUp() { ExtensionErrorReporter::GetInstance()->ClearErrors(); } -class ExtensionsServiceTest - : public ExtensionsServiceTestBase, public NotificationObserver { +class ExtensionServiceTest + : public ExtensionServiceTestBase, public NotificationObserver { public: - ExtensionsServiceTest() : installed_(NULL) { + ExtensionServiceTest() : installed_(NULL) { registrar_.Add(this, NotificationType::EXTENSION_LOADED, NotificationService::AllSources()); registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, @@ -816,7 +816,7 @@ void PackExtensionTestClient::OnPackFailure(const std::string& error_message) { } // Test loading good extensions from the profile directory. -TEST_F(ExtensionsServiceTest, LoadAllExtensionsFromDirectorySuccess) { +TEST_F(ExtensionServiceTest, LoadAllExtensionsFromDirectorySuccess) { // Initialize the test dir with a good Preferences/extensions. FilePath source_install_dir; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_install_dir)); @@ -827,7 +827,7 @@ TEST_F(ExtensionsServiceTest, LoadAllExtensionsFromDirectorySuccess) { FilePath pref_path = source_install_dir .DirName() .AppendASCII("Preferences"); - InitializeInstalledExtensionsService(pref_path, source_install_dir); + InitializeInstalledExtensionService(pref_path, source_install_dir); service_->Init(); @@ -920,7 +920,7 @@ TEST_F(ExtensionsServiceTest, LoadAllExtensionsFromDirectorySuccess) { }; // Test loading bad extensions from the profile directory. -TEST_F(ExtensionsServiceTest, LoadAllExtensionsFromDirectoryFail) { +TEST_F(ExtensionServiceTest, LoadAllExtensionsFromDirectoryFail) { // Initialize the test dir with a bad Preferences/extensions. FilePath source_install_dir; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_install_dir)); @@ -932,7 +932,7 @@ TEST_F(ExtensionsServiceTest, LoadAllExtensionsFromDirectoryFail) { .DirName() .AppendASCII("Preferences"); - InitializeInstalledExtensionsService(pref_path, source_install_dir); + InitializeInstalledExtensionService(pref_path, source_install_dir); service_->Init(); loop_.RunAllPending(); @@ -959,7 +959,7 @@ TEST_F(ExtensionsServiceTest, LoadAllExtensionsFromDirectoryFail) { // Test that partially deleted extensions are cleaned up during startup // Test loading bad extensions from the profile directory. -TEST_F(ExtensionsServiceTest, CleanupOnStartup) { +TEST_F(ExtensionServiceTest, CleanupOnStartup) { FilePath source_install_dir; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_install_dir)); source_install_dir = source_install_dir @@ -970,7 +970,7 @@ TEST_F(ExtensionsServiceTest, CleanupOnStartup) { .DirName() .AppendASCII("Preferences"); - InitializeInstalledExtensionsService(pref_path, source_install_dir); + InitializeInstalledExtensionService(pref_path, source_install_dir); // Simulate that one of them got partially deleted by clearing its pref. DictionaryValue* dict = @@ -999,8 +999,8 @@ TEST_F(ExtensionsServiceTest, CleanupOnStartup) { // Test installing extensions. This test tries to install few extensions using // crx files. If you need to change those crx files, feel free to repackage // them, throw away the key used and change the id's above. -TEST_F(ExtensionsServiceTest, InstallExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, InstallExtension) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); @@ -1059,8 +1059,8 @@ TEST_F(ExtensionsServiceTest, InstallExtension) { } // Test the handling of killed extensions. -TEST_F(ExtensionsServiceTest, KilledExtensions) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, KilledExtensions) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); @@ -1105,10 +1105,10 @@ TEST_F(ExtensionsServiceTest, KilledExtensions) { } // Install a user script (they get converted automatically to an extension) -TEST_F(ExtensionsServiceTest, InstallUserScript) { +TEST_F(ExtensionServiceTest, InstallUserScript) { // The details of script conversion are tested elsewhere, this just tests - // integration with ExtensionsService. - InitializeEmptyExtensionsService(); + // integration with ExtensionService. + InitializeEmptyExtensionService(); FilePath path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path)); @@ -1138,8 +1138,8 @@ TEST_F(ExtensionsServiceTest, InstallUserScript) { // This tests that the granted permissions preferences are correctly set when // installing an extension. -TEST_F(ExtensionsServiceTest, GrantedPermissions) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, GrantedPermissions) { + InitializeEmptyExtensionService(); FilePath path; FilePath pem_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path)); @@ -1197,8 +1197,8 @@ TEST_F(ExtensionsServiceTest, GrantedPermissions) { // Tests that the granted permissions full_access bit gets set correctly when // an extension contains an NPAPI plugin. Don't run this test on Chrome OS // since they don't support plugins. -TEST_F(ExtensionsServiceTest, GrantedFullAccessPermissions) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, GrantedFullAccessPermissions) { + InitializeEmptyExtensionService(); FilePath path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path)); @@ -1233,8 +1233,8 @@ TEST_F(ExtensionsServiceTest, GrantedFullAccessPermissions) { // Tests that the extension is disabled when permissions are missing from // the extension's granted permissions preferences. (This simulates updating // the browser to a version which recognizes more permissions). -TEST_F(ExtensionsServiceTest, GrantedAPIAndHostPermissions) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, GrantedAPIAndHostPermissions) { + InitializeEmptyExtensionService(); FilePath path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path)); @@ -1363,8 +1363,8 @@ TEST_F(ExtensionsServiceTest, GrantedAPIAndHostPermissions) { } // Test Packaging and installing an extension. -TEST_F(ExtensionsServiceTest, PackExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, PackExtension) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1411,8 +1411,8 @@ TEST_F(ExtensionsServiceTest, PackExtension) { } // Test Packaging and installing an extension whose name contains punctuation. -TEST_F(ExtensionsServiceTest, PackPunctuatedExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, PackPunctuatedExtension) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1490,8 +1490,8 @@ TEST_F(ExtensionsServiceTest, PackPunctuatedExtension) { // > openssl pkcs8 -topk8 -nocrypt -in privkey.pem -out privkey_asn1.pem // The privkey.pem is a PrivateKey, and the pcks8 -topk8 creates a // PrivateKeyInfo ASN.1 structure, we our RSAPrivateKey expects. -TEST_F(ExtensionsServiceTest, PackExtensionOpenSSLKey) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, PackExtensionOpenSSLKey) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1517,8 +1517,8 @@ TEST_F(ExtensionsServiceTest, PackExtensionOpenSSLKey) { InstallExtension(crx_path, true); } -TEST_F(ExtensionsServiceTest, InstallTheme) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, InstallTheme) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1553,9 +1553,9 @@ TEST_F(ExtensionsServiceTest, InstallTheme) { ValidatePrefKeyCount(pref_count); } -TEST_F(ExtensionsServiceTest, LoadLocalizedTheme) { +TEST_F(ExtensionServiceTest, LoadLocalizedTheme) { // Load. - InitializeEmptyExtensionsService(); + InitializeEmptyExtensionService(); FilePath extension_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extension_path)); extension_path = extension_path @@ -1571,8 +1571,8 @@ TEST_F(ExtensionsServiceTest, LoadLocalizedTheme) { EXPECT_EQ("description", service_->extensions()->at(0)->description()); } -TEST_F(ExtensionsServiceTest, InstallLocalizedTheme) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, InstallLocalizedTheme) { + InitializeEmptyExtensionService(); FilePath theme_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &theme_path)); theme_path = theme_path @@ -1587,8 +1587,8 @@ TEST_F(ExtensionsServiceTest, InstallLocalizedTheme) { EXPECT_EQ("description", service_->extensions()->at(0)->description()); } -TEST_F(ExtensionsServiceTest, InstallApps) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, InstallApps) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1611,8 +1611,8 @@ TEST_F(ExtensionsServiceTest, InstallApps) { ValidatePrefKeyCount(pref_count); } -TEST_F(ExtensionsServiceTest, InstallAppsWithUnlimtedStorage) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, InstallAppsWithUnlimtedStorage) { + InitializeEmptyExtensionService(); EXPECT_TRUE(service_->extensions()->empty()); EXPECT_TRUE(service_->unlimited_storage_map_.empty()); @@ -1671,8 +1671,8 @@ TEST_F(ExtensionsServiceTest, InstallAppsWithUnlimtedStorage) { EXPECT_TRUE(service_->unlimited_storage_map_.empty()); } -TEST_F(ExtensionsServiceTest, InstallAppsAndCheckStorageProtection) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, InstallAppsAndCheckStorageProtection) { + InitializeEmptyExtensionService(); EXPECT_TRUE(service_->extensions()->empty()); EXPECT_TRUE(service_->protected_storage_map_.empty()); @@ -1715,8 +1715,8 @@ TEST_F(ExtensionsServiceTest, InstallAppsAndCheckStorageProtection) { } // Test that when an extension version is reinstalled, nothing happens. -TEST_F(ExtensionsServiceTest, Reinstall) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, Reinstall) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1750,8 +1750,8 @@ TEST_F(ExtensionsServiceTest, Reinstall) { } // Test upgrading a signed extension. -TEST_F(ExtensionsServiceTest, UpgradeSignedGood) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpgradeSignedGood) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1777,8 +1777,8 @@ TEST_F(ExtensionsServiceTest, UpgradeSignedGood) { } // Test upgrading a signed extension with a bad signature. -TEST_F(ExtensionsServiceTest, UpgradeSignedBad) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpgradeSignedBad) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1804,8 +1804,8 @@ TEST_F(ExtensionsServiceTest, UpgradeSignedBad) { } // Test a normal update via the UpdateExtension API -TEST_F(ExtensionsServiceTest, UpdateExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdateExtension) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1823,8 +1823,8 @@ TEST_F(ExtensionsServiceTest, UpdateExtension) { } // Test updating a not-already-installed extension - this should fail -TEST_F(ExtensionsServiceTest, UpdateNotInstalledExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdateNotInstalledExtension) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1839,8 +1839,8 @@ TEST_F(ExtensionsServiceTest, UpdateNotInstalledExtension) { } // Makes sure you can't downgrade an extension via UpdateExtension -TEST_F(ExtensionsServiceTest, UpdateWillNotDowngrade) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdateWillNotDowngrade) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1859,8 +1859,8 @@ TEST_F(ExtensionsServiceTest, UpdateWillNotDowngrade) { } // Make sure calling update with an identical version does nothing -TEST_F(ExtensionsServiceTest, UpdateToSameVersionIsNoop) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdateToSameVersionIsNoop) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1874,8 +1874,8 @@ TEST_F(ExtensionsServiceTest, UpdateToSameVersionIsNoop) { } // Tests that updating an extension does not clobber old state. -TEST_F(ExtensionsServiceTest, UpdateExtensionPreservesState) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdateExtensionPreservesState) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1901,8 +1901,8 @@ TEST_F(ExtensionsServiceTest, UpdateExtensionPreservesState) { } // Tests that updating preserves extension location. -TEST_F(ExtensionsServiceTest, UpdateExtensionPreservesLocation) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdateExtensionPreservesLocation) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -1926,8 +1926,8 @@ TEST_F(ExtensionsServiceTest, UpdateExtensionPreservesLocation) { } // Makes sure that LOAD extension types can downgrade. -TEST_F(ExtensionsServiceTest, LoadExtensionsCanDowngrade) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, LoadExtensionsCanDowngrade) { + InitializeEmptyExtensionService(); ScopedTempDir temp; ASSERT_TRUE(temp.CreateUniqueTempDir()); @@ -1971,8 +1971,8 @@ TEST_F(ExtensionsServiceTest, LoadExtensionsCanDowngrade) { } // Test adding a pending extension. -TEST_F(ExtensionsServiceTest, AddPendingExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, AddPendingExtension) { + InitializeEmptyExtensionService(); const std::string kFakeId("fake-id"); const GURL kFakeUpdateURL("http:://fake.update/url"); @@ -2007,8 +2007,8 @@ const bool kGoodInitialIncognitoEnabled = true; } // namespace // Test updating a pending extension. -TEST_F(ExtensionsServiceTest, UpdatePendingExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdatePendingExtension) { + InitializeEmptyExtensionService(); service_->AddPendingExtensionFromSync( kGoodId, GURL(kGoodUpdateURL), kCrxTypeExtension, kGoodInstallSilently, kGoodInitialState, @@ -2035,8 +2035,8 @@ TEST_F(ExtensionsServiceTest, UpdatePendingExtension) { } // Test updating a pending theme. -TEST_F(ExtensionsServiceTest, UpdatePendingTheme) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdatePendingTheme) { + InitializeEmptyExtensionService(); service_->AddPendingExtensionFromSync( theme_crx, GURL(), PendingExtensionInfo::THEME, false, Extension::ENABLED, false); @@ -2061,8 +2061,8 @@ TEST_F(ExtensionsServiceTest, UpdatePendingTheme) { // Test updating a pending CRX as if the source is an external extension // with an update URL. In this case we don't know if the CRX is a theme // or not. -TEST_F(ExtensionsServiceTest, UpdatePendingExternalCrx) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdatePendingExternalCrx) { + InitializeEmptyExtensionService(); service_->AddPendingExtensionFromExternalUpdateUrl( theme_crx, GURL(), Extension::EXTERNAL_PREF_DOWNLOAD); @@ -2087,8 +2087,8 @@ TEST_F(ExtensionsServiceTest, UpdatePendingExternalCrx) { // Test updating a pending CRX as if the source is an external extension // with an update URL. The external update should overwrite a sync update, // but a sync update should not overwrite a non-sync update. -TEST_F(ExtensionsServiceTest, UpdatePendingExternalCrxWinsOverSync) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdatePendingExternalCrxWinsOverSync) { + InitializeEmptyExtensionService(); // Add a crx to be installed from the update mechanism. service_->AddPendingExtensionFromSync( @@ -2125,8 +2125,8 @@ TEST_F(ExtensionsServiceTest, UpdatePendingExternalCrxWinsOverSync) { // Updating a theme should fail if the updater is explicitly told that // the CRX is not a theme. -TEST_F(ExtensionsServiceTest, UpdatePendingCrxThemeMismatch) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdatePendingCrxThemeMismatch) { + InitializeEmptyExtensionService(); service_->AddPendingExtensionFromSync( theme_crx, GURL(), PendingExtensionInfo::EXTENSION, @@ -2151,8 +2151,8 @@ TEST_F(ExtensionsServiceTest, UpdatePendingCrxThemeMismatch) { // UpdateExtension(). // Test updating a pending extension with wrong is_theme. -TEST_F(ExtensionsServiceTest, UpdatePendingExtensionWrongIsTheme) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdatePendingExtensionWrongIsTheme) { + InitializeEmptyExtensionService(); // Add pending extension with a flipped is_theme. service_->AddPendingExtensionFromSync( kGoodId, GURL(kGoodUpdateURL), @@ -2176,8 +2176,8 @@ TEST_F(ExtensionsServiceTest, UpdatePendingExtensionWrongIsTheme) { // unsyncable extensions are blocked. // Test updating a pending extension for one that is not pending. -TEST_F(ExtensionsServiceTest, UpdatePendingExtensionNotPending) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdatePendingExtensionNotPending) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); @@ -2190,8 +2190,8 @@ TEST_F(ExtensionsServiceTest, UpdatePendingExtensionNotPending) { // Test updating a pending extension for one that is already // installed. -TEST_F(ExtensionsServiceTest, UpdatePendingExtensionAlreadyInstalled) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UpdatePendingExtensionAlreadyInstalled) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); @@ -2216,8 +2216,8 @@ TEST_F(ExtensionsServiceTest, UpdatePendingExtensionAlreadyInstalled) { } // Test pref settings for blacklist and unblacklist extensions. -TEST_F(ExtensionsServiceTest, SetUnsetBlacklistInPrefs) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, SetUnsetBlacklistInPrefs) { + InitializeEmptyExtensionService(); std::vector<std::string> blacklist; blacklist.push_back(good0); blacklist.push_back("invalid_id"); // an invalid id @@ -2245,8 +2245,8 @@ TEST_F(ExtensionsServiceTest, SetUnsetBlacklistInPrefs) { } // Unload installed extension from blacklist. -TEST_F(ExtensionsServiceTest, UnloadBlacklistedExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UnloadBlacklistedExtension) { + InitializeEmptyExtensionService(); FilePath extensions_path; EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -2278,8 +2278,8 @@ TEST_F(ExtensionsServiceTest, UnloadBlacklistedExtension) { } // Unload installed extension from blacklist. -TEST_F(ExtensionsServiceTest, BlacklistedExtensionWillNotInstall) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, BlacklistedExtensionWillNotInstall) { + InitializeEmptyExtensionService(); std::vector<std::string> blacklist; blacklist.push_back(good_crx); service_->UpdateExtensionBlacklist(blacklist); @@ -2302,7 +2302,7 @@ TEST_F(ExtensionsServiceTest, BlacklistedExtensionWillNotInstall) { // Test loading extensions from the profile directory, except // blacklisted ones. -TEST_F(ExtensionsServiceTest, WillNotLoadBlacklistedExtensionsFromDirectory) { +TEST_F(ExtensionServiceTest, WillNotLoadBlacklistedExtensionsFromDirectory) { // Initialize the test dir with a good Preferences/extensions. FilePath source_install_dir; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_install_dir)); @@ -2313,7 +2313,7 @@ TEST_F(ExtensionsServiceTest, WillNotLoadBlacklistedExtensionsFromDirectory) { FilePath pref_path = source_install_dir .DirName() .AppendASCII("Preferences"); - InitializeInstalledExtensionsService(pref_path, source_install_dir); + InitializeInstalledExtensionService(pref_path, source_install_dir); // Blacklist good1. std::vector<std::string> blacklist; @@ -2342,7 +2342,7 @@ TEST_F(ExtensionsServiceTest, WillNotLoadBlacklistedExtensionsFromDirectory) { #if defined(OS_CHROMEOS) // Test loading extensions from the profile directory, except // ones with a plugin. -TEST_F(ExtensionsServiceTest, WillNotLoadPluginExtensionsFromDirectory) { +TEST_F(ExtensionServiceTest, WillNotLoadPluginExtensionsFromDirectory) { // Initialize the test dir with a good Preferences/extensions. FilePath source_install_dir; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_install_dir)); @@ -2353,7 +2353,7 @@ TEST_F(ExtensionsServiceTest, WillNotLoadPluginExtensionsFromDirectory) { FilePath pref_path = source_install_dir .DirName() .AppendASCII("Preferences"); - InitializeInstalledExtensionsService(pref_path, source_install_dir); + InitializeInstalledExtensionService(pref_path, source_install_dir); // good1 contains a plugin. // Load extensions. @@ -2373,8 +2373,8 @@ TEST_F(ExtensionsServiceTest, WillNotLoadPluginExtensionsFromDirectory) { #endif // Will not install extension blacklisted by policy. -TEST_F(ExtensionsServiceTest, BlacklistedByPolicyWillNotInstall) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, BlacklistedByPolicyWillNotInstall) { + InitializeEmptyExtensionService(); ListValue* whitelist = profile_->GetPrefs()->GetMutableList(prefs::kExtensionInstallAllowList); @@ -2404,8 +2404,8 @@ TEST_F(ExtensionsServiceTest, BlacklistedByPolicyWillNotInstall) { } // Extension blacklisted by policy get unloaded after installing. -TEST_F(ExtensionsServiceTest, BlacklistedByPolicyRemovedIfRunning) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, BlacklistedByPolicyRemovedIfRunning) { + InitializeEmptyExtensionService(); // Install good_crx. FilePath extensions_path; @@ -2434,8 +2434,8 @@ TEST_F(ExtensionsServiceTest, BlacklistedByPolicyRemovedIfRunning) { } // Tests disabling extensions -TEST_F(ExtensionsServiceTest, DisableExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, DisableExtension) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -2460,8 +2460,8 @@ TEST_F(ExtensionsServiceTest, DisableExtension) { } // Tests disabling all extensions (simulating --disable-extensions flag). -TEST_F(ExtensionsServiceTest, DisableAllExtensions) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, DisableAllExtensions) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); @@ -2498,8 +2498,8 @@ TEST_F(ExtensionsServiceTest, DisableAllExtensions) { } // Tests reloading extensions -TEST_F(ExtensionsServiceTest, ReloadExtensions) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, ReloadExtensions) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -2536,8 +2536,8 @@ TEST_F(ExtensionsServiceTest, ReloadExtensions) { } // Tests uninstalling normal extensions -TEST_F(ExtensionsServiceTest, UninstallExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UninstallExtension) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -2574,8 +2574,8 @@ TEST_F(ExtensionsServiceTest, UninstallExtension) { } // Tests the uninstaller helper. -TEST_F(ExtensionsServiceTest, UninstallExtensionHelper) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, UninstallExtensionHelper) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -2589,7 +2589,7 @@ TEST_F(ExtensionsServiceTest, UninstallExtensionHelper) { FilePath extension_path = extensions_install_dir_.AppendASCII(extension_id); EXPECT_TRUE(file_util::PathExists(extension_path)); - bool result = ExtensionsService::UninstallExtensionHelper(service_, + bool result = ExtensionService::UninstallExtensionHelper(service_, extension_id); total_successes_ = 0; @@ -2610,13 +2610,13 @@ TEST_F(ExtensionsServiceTest, UninstallExtensionHelper) { // Attempt to uninstall again. This should fail as we just removed the // extension. - result = ExtensionsService::UninstallExtensionHelper(service_, extension_id); + result = ExtensionService::UninstallExtensionHelper(service_, extension_id); EXPECT_FALSE(result); } // Verifies extension state is removed upon uninstall -TEST_F(ExtensionsServiceTest, ClearExtensionData) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, ClearExtensionData) { + InitializeEmptyExtensionService(); // Load a test extension. FilePath path; @@ -2692,8 +2692,8 @@ TEST_F(ExtensionsServiceTest, ClearExtensionData) { } // Tests loading single extensions (like --load-extension) -TEST_F(ExtensionsServiceTest, LoadExtension) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, LoadExtension) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); extensions_path = extensions_path.AppendASCII("extensions"); @@ -2735,8 +2735,8 @@ TEST_F(ExtensionsServiceTest, LoadExtension) { // Tests that we generate IDs when they are not specified in the manifest for // --load-extension. -TEST_F(ExtensionsServiceTest, GenerateID) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, GenerateID) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); @@ -2761,7 +2761,7 @@ TEST_F(ExtensionsServiceTest, GenerateID) { ASSERT_EQ(previous_id, loaded_[0]->id()); } -void ExtensionsServiceTest::TestExternalProvider( +void ExtensionServiceTest::TestExternalProvider( MockExtensionProvider* provider, Extension::Location location) { // Verify that starting with no providers loads no extensions. service_->Init(); @@ -2891,9 +2891,9 @@ void ExtensionsServiceTest::TestExternalProvider( // Tests the external installation feature #if defined(OS_WIN) -TEST_F(ExtensionsServiceTest, ExternalInstallRegistry) { +TEST_F(ExtensionServiceTest, ExternalInstallRegistry) { // This should all work, even when normal extension installation is disabled. - InitializeEmptyExtensionsService(); + InitializeEmptyExtensionService(); set_extensions_enabled(false); // Now add providers. Extension system takes ownership of the objects. @@ -2904,8 +2904,8 @@ TEST_F(ExtensionsServiceTest, ExternalInstallRegistry) { } #endif -TEST_F(ExtensionsServiceTest, ExternalInstallPref) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, ExternalInstallPref) { + InitializeEmptyExtensionService(); // Now add providers. Extension system takes ownership of the objects. MockExtensionProvider* pref_provider = @@ -2915,9 +2915,9 @@ TEST_F(ExtensionsServiceTest, ExternalInstallPref) { TestExternalProvider(pref_provider, Extension::EXTERNAL_PREF); } -TEST_F(ExtensionsServiceTest, ExternalInstallPrefUpdateUrl) { +TEST_F(ExtensionServiceTest, ExternalInstallPrefUpdateUrl) { // This should all work, even when normal extension installation is disabled. - InitializeEmptyExtensionsService(); + InitializeEmptyExtensionService(); set_extensions_enabled(false); // TODO(skerner): The mock provider is not a good model of a provider @@ -2935,7 +2935,7 @@ TEST_F(ExtensionsServiceTest, ExternalInstallPrefUpdateUrl) { // Tests that external extensions get uninstalled when the external extension // providers can't account for them. -TEST_F(ExtensionsServiceTest, ExternalUninstall) { +TEST_F(ExtensionServiceTest, ExternalUninstall) { // Start the extensions service with one external extension already installed. FilePath source_install_dir; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_install_dir)); @@ -2948,7 +2948,7 @@ TEST_F(ExtensionsServiceTest, ExternalUninstall) { .AppendASCII("PreferencesExternal"); // This initializes the extensions service with no ExternalExtensionProviders. - InitializeInstalledExtensionsService(pref_path, source_install_dir); + InitializeInstalledExtensionService(pref_path, source_install_dir); set_extensions_enabled(false); service_->Init(); @@ -2966,8 +2966,8 @@ TEST_F(ExtensionsServiceTest, ExternalUninstall) { ASSERT_EQ(0u, loaded_.size()); } -TEST_F(ExtensionsServiceTest, ExternalPrefProvider) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, ExternalPrefProvider) { + InitializeEmptyExtensionService(); std::string json_data = "{" " \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\": {" @@ -3031,7 +3031,7 @@ TEST_F(ExtensionsServiceTest, ExternalPrefProvider) { } // Test loading good extensions from the profile directory. -TEST_F(ExtensionsServiceTest, LoadAndRelocalizeExtensions) { +TEST_F(ExtensionServiceTest, LoadAndRelocalizeExtensions) { // Initialize the test dir with a good Preferences/extensions. FilePath source_install_dir; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_install_dir)); @@ -3039,7 +3039,7 @@ TEST_F(ExtensionsServiceTest, LoadAndRelocalizeExtensions) { .AppendASCII("extensions") .AppendASCII("l10n"); FilePath pref_path = source_install_dir.AppendASCII("Preferences"); - InitializeInstalledExtensionsService(pref_path, source_install_dir); + InitializeInstalledExtensionService(pref_path, source_install_dir); service_->Init(); loop_.RunAllPending(); @@ -3089,25 +3089,25 @@ class ExtensionsReadyRecorder : public NotificationObserver { }; // Test that we get enabled/disabled correctly for all the pref/command-line -// combinations. We don't want to derive from the ExtensionsServiceTest class -// for this test, so we use ExtensionsServiceTestSimple. +// combinations. We don't want to derive from the ExtensionServiceTest class +// for this test, so we use ExtensionServiceTestSimple. // // Also tests that we always fire EXTENSIONS_READY, no matter whether we are // enabled or not. -TEST(ExtensionsServiceTestSimple, Enabledness) { +TEST(ExtensionServiceTestSimple, Enabledness) { ExtensionsReadyRecorder recorder; scoped_ptr<TestingProfile> profile(new TestingProfile()); MessageLoop loop; BrowserThread ui_thread(BrowserThread::UI, &loop); BrowserThread file_thread(BrowserThread::FILE, &loop); scoped_ptr<CommandLine> command_line; - scoped_refptr<ExtensionsService> service; + scoped_refptr<ExtensionService> service; FilePath install_dir = profile->GetPath() - .AppendASCII(ExtensionsService::kInstallDirectoryName); + .AppendASCII(ExtensionService::kInstallDirectoryName); // By default, we are enabled. command_line.reset(new CommandLine(CommandLine::NO_PROGRAM)); - service = profile->CreateExtensionsService(command_line.get(), + service = profile->CreateExtensionService(command_line.get(), install_dir); EXPECT_TRUE(service->extensions_enabled()); service->Init(); @@ -3118,7 +3118,7 @@ TEST(ExtensionsServiceTestSimple, Enabledness) { recorder.set_ready(false); profile.reset(new TestingProfile()); command_line->AppendSwitch(switches::kDisableExtensions); - service = profile->CreateExtensionsService(command_line.get(), + service = profile->CreateExtensionService(command_line.get(), install_dir); EXPECT_FALSE(service->extensions_enabled()); service->Init(); @@ -3128,7 +3128,7 @@ TEST(ExtensionsServiceTestSimple, Enabledness) { recorder.set_ready(false); profile.reset(new TestingProfile()); profile->GetPrefs()->SetBoolean(prefs::kDisableExtensions, true); - service = profile->CreateExtensionsService(command_line.get(), + service = profile->CreateExtensionService(command_line.get(), install_dir); EXPECT_FALSE(service->extensions_enabled()); service->Init(); @@ -3139,7 +3139,7 @@ TEST(ExtensionsServiceTestSimple, Enabledness) { profile.reset(new TestingProfile()); profile->GetPrefs()->SetBoolean(prefs::kDisableExtensions, true); command_line.reset(new CommandLine(CommandLine::NO_PROGRAM)); - service = profile->CreateExtensionsService(command_line.get(), + service = profile->CreateExtensionService(command_line.get(), install_dir); EXPECT_FALSE(service->extensions_enabled()); service->Init(); @@ -3152,8 +3152,8 @@ TEST(ExtensionsServiceTestSimple, Enabledness) { } // Test loading extensions that require limited and unlimited storage quotas. -TEST_F(ExtensionsServiceTest, StorageQuota) { - InitializeEmptyExtensionsService(); +TEST_F(ExtensionServiceTest, StorageQuota) { + InitializeEmptyExtensionService(); FilePath extensions_path; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extensions_path)); @@ -3211,9 +3211,9 @@ TEST_F(ExtensionsServiceTest, StorageQuota) { EXPECT_EQ(kint64max, unlimited_quota); } -// Tests ExtensionsService::register_component_extension(). -TEST_F(ExtensionsServiceTest, ComponentExtensions) { - InitializeEmptyExtensionsService(); +// Tests ExtensionService::register_component_extension(). +TEST_F(ExtensionServiceTest, ComponentExtensions) { + InitializeEmptyExtensionService(); // Component extensions should work even when extensions are disabled. set_extensions_enabled(false); @@ -3231,7 +3231,7 @@ TEST_F(ExtensionsServiceTest, ComponentExtensions) { path.Append(Extension::kManifestFilename), &manifest)); service_->register_component_extension( - ExtensionsService::ComponentExtensionInfo(manifest, path)); + ExtensionService::ComponentExtensionInfo(manifest, path)); service_->Init(); // Note that we do not pump messages -- the extension should be loaded diff --git a/chrome/browser/extensions/extensions_service_unittest.h b/chrome/browser/extensions/extension_service_unittest.h index f38cc34..8ca7b28 100644 --- a/chrome/browser/extensions/extensions_service_unittest.h +++ b/chrome/browser/extensions/extension_service_unittest.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_UNITTEST_H_ -#define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_UNITTEST_H_ +#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ +#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ #pragma once #include "base/file_path.h" @@ -12,21 +12,21 @@ #include "base/scoped_ptr.h" #include "base/scoped_temp_dir.h" #include "chrome/browser/browser_thread.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "testing/gtest/include/gtest/gtest.h" -class ExtensionsServiceTestBase : public testing::Test { +class ExtensionServiceTestBase : public testing::Test { public: - ExtensionsServiceTestBase(); - ~ExtensionsServiceTestBase(); + ExtensionServiceTestBase(); + ~ExtensionServiceTestBase(); - virtual void InitializeExtensionsService( + virtual void InitializeExtensionService( const FilePath& pref_file, const FilePath& extensions_install_dir); - virtual void InitializeInstalledExtensionsService( + virtual void InitializeInstalledExtensionService( const FilePath& prefs_file, const FilePath& source_install_dir); - virtual void InitializeEmptyExtensionsService(); + virtual void InitializeEmptyExtensionService(); static void SetUpTestCase(); @@ -40,7 +40,7 @@ class ExtensionsServiceTestBase : public testing::Test { ScopedTempDir temp_dir_; scoped_ptr<Profile> profile_; FilePath extensions_install_dir_; - scoped_refptr<ExtensionsService> service_; + scoped_refptr<ExtensionService> service_; size_t total_successes_; MessageLoop loop_; BrowserThread ui_thread_; @@ -50,4 +50,4 @@ class ExtensionsServiceTestBase : public testing::Test { BrowserThread io_thread_; }; -#endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_UNITTEST_H_ +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ diff --git a/chrome/browser/extensions/extension_sidebar_api.cc b/chrome/browser/extensions/extension_sidebar_api.cc index e11bf88..bd32d5a 100644 --- a/chrome/browser/extensions/extension_sidebar_api.cc +++ b/chrome/browser/extensions/extension_sidebar_api.cc @@ -10,7 +10,7 @@ #include "base/string16.h" #include "base/values.h" #include "chrome/browser/extensions/extension_event_router.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_tabs_module.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sidebar/sidebar_container.h" diff --git a/chrome/browser/extensions/extension_startup_browsertest.cc b/chrome/browser/extensions/extension_startup_browsertest.cc index 5fa28f9..224a6c5 100644 --- a/chrome/browser/extensions/extension_startup_browsertest.cc +++ b/chrome/browser/extensions/extension_startup_browsertest.cc @@ -8,7 +8,7 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/path_service.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -85,7 +85,7 @@ class ExtensionStartupTestBase : public InProcessBrowserTest { void WaitForServicesToStart(int num_expected_extensions, bool expect_extensions_enabled) { - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); // Count the number of non-component extensions. int found_extensions = 0; @@ -168,7 +168,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, Test) { IN_PROC_BROWSER_TEST_F(ExtensionsStartupTest, MAYBE_NoFileAccess) { WaitForServicesToStart(num_expected_extensions_, true); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); for (size_t i = 0; i < service->extensions()->size(); ++i) { if (service->extensions()->at(i)->location() == Extension::COMPONENT) continue; diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc index 8463b9e..129db62 100644 --- a/chrome/browser/extensions/extension_tabs_module.cc +++ b/chrome/browser/extensions/extension_tabs_module.cc @@ -15,7 +15,7 @@ #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_infobar_delegate.h" #include "chrome/browser/extensions/extension_tabs_module_constants.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/backing_store.h" #include "chrome/browser/renderer_host/render_view_host.h" diff --git a/chrome/browser/extensions/extension_test_api.cc b/chrome/browser/extensions/extension_test_api.cc index 104e51b..83800b0 100644 --- a/chrome/browser/extensions/extension_test_api.cc +++ b/chrome/browser/extensions/extension_test_api.cc @@ -7,7 +7,7 @@ #include <string> #include "base/singleton.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extensions_quota_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" @@ -56,7 +56,7 @@ bool ExtensionTestLogFunction::RunImpl() { ExtensionTestQuotaResetFunction::~ExtensionTestQuotaResetFunction() {} bool ExtensionTestQuotaResetFunction::RunImpl() { - ExtensionsService* service = profile()->GetExtensionsService(); + ExtensionService* service = profile()->GetExtensionService(); ExtensionsQuotaService* quota = service->quota_service(); quota->Purge(); quota->violators_.clear(); diff --git a/chrome/browser/extensions/extension_toolbar_model.cc b/chrome/browser/extensions/extension_toolbar_model.cc index c777427..4289913 100644 --- a/chrome/browser/extensions/extension_toolbar_model.cc +++ b/chrome/browser/extensions/extension_toolbar_model.cc @@ -5,14 +5,14 @@ #include "chrome/browser/extensions/extension_toolbar_model.h" #include "chrome/browser/extensions/extension_prefs.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" -ExtensionToolbarModel::ExtensionToolbarModel(ExtensionsService* service) +ExtensionToolbarModel::ExtensionToolbarModel(ExtensionService* service) : service_(service), prefs_(service->profile()->GetPrefs()), extensions_initialized_(false) { @@ -160,7 +160,7 @@ void ExtensionToolbarModel::RemoveExtension(const Extension* extension) { } // Combine the currently enabled extensions that have browser actions (which -// we get from the ExtensionsService) with the ordering we get from the +// we get from the ExtensionService) with the ordering we get from the // pref service. For robustness we use a somewhat inefficient process: // 1. Create a vector of extensions sorted by their pref values. This vector may // have holes. diff --git a/chrome/browser/extensions/extension_toolbar_model.h b/chrome/browser/extensions/extension_toolbar_model.h index 37c3a08..f782c05 100644 --- a/chrome/browser/extensions/extension_toolbar_model.h +++ b/chrome/browser/extensions/extension_toolbar_model.h @@ -11,13 +11,13 @@ #include "chrome/common/notification_observer.h" #include "chrome/common/notification_registrar.h" -class ExtensionsService; +class ExtensionService; class PrefService; // Model for the browser actions toolbar. class ExtensionToolbarModel : public NotificationObserver { public: - explicit ExtensionToolbarModel(ExtensionsService* service); + explicit ExtensionToolbarModel(ExtensionService* service); ~ExtensionToolbarModel(); // Notifies the toolbar model that the Profile that suplied its @@ -96,8 +96,8 @@ class ExtensionToolbarModel : public NotificationObserver { void AddExtension(const Extension* extension); void RemoveExtension(const Extension* extension); - // Our ExtensionsService, guaranteed to outlive us. - ExtensionsService* service_; + // Our ExtensionService, guaranteed to outlive us. + ExtensionService* service_; PrefService* prefs_; diff --git a/chrome/browser/extensions/extension_toolbar_model_browsertest.cc b/chrome/browser/extensions/extension_toolbar_model_browsertest.cc index bc77a8e..951f424 100644 --- a/chrome/browser/extensions/extension_toolbar_model_browsertest.cc +++ b/chrome/browser/extensions/extension_toolbar_model_browsertest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "chrome/browser/extensions/extension_browsertest.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_toolbar_model.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" @@ -12,7 +12,7 @@ // An InProcessBrowserTest for testing the ExtensionToolbarModel. // TODO(erikkay) It's unfortunate that this needs to be an in-proc browser test. -// It would be nice to refactor things so that ExtensionsService could run +// It would be nice to refactor things so that ExtensionService could run // without so much of the browser in place. class ExtensionToolbarModelTest : public ExtensionBrowserTest, public ExtensionToolbarModel::Observer { @@ -27,7 +27,7 @@ class ExtensionToolbarModelTest : public ExtensionBrowserTest, virtual Browser* CreateBrowser(Profile* profile) { Browser* b = InProcessBrowserTest::CreateBrowser(profile); - ExtensionsService* service = b->profile()->GetExtensionsService(); + ExtensionService* service = b->profile()->GetExtensionService(); model_ = service->toolbar_model(); model_->AddObserver(this); return b; diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index 91b6c31..d143052 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -21,7 +21,7 @@ #include "base/version.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extension_error_reporter.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/utility_process_host.h" @@ -637,7 +637,7 @@ void ExtensionUpdater::OnCRXFetchComplete(const GURL& url, ProcessBlacklist(data); } else { // Successfully fetched - now write crx to a file so we can have the - // ExtensionsService install it. + // ExtensionService install it. BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( @@ -669,7 +669,7 @@ void ExtensionUpdater::OnCRXFileWritten(const std::string& id, // This can be called after we've been stopped. if (!alive_) return; - // The ExtensionsService is now responsible for cleaning up the temp file + // The ExtensionService is now responsible for cleaning up the temp file // at |path|. service_->UpdateExtension(id, path, download_url); } @@ -701,7 +701,7 @@ void ExtensionUpdater::TimerFired() { // If the user has overridden the update frequency, don't bother reporting // this. - if (frequency_seconds_ == ExtensionsService::kDefaultUpdateFrequencySeconds) { + if (frequency_seconds_ == ExtensionService::kDefaultUpdateFrequencySeconds) { Time last = Time::FromInternalValue(prefs_->GetInt64( kLastExtensionsUpdateCheck)); if (last.ToInternalValue() != 0) { diff --git a/chrome/browser/extensions/extension_updater.h b/chrome/browser/extensions/extension_updater.h index 041dba0..8c1997c 100644 --- a/chrome/browser/extensions/extension_updater.h +++ b/chrome/browser/extensions/extension_updater.h @@ -19,7 +19,7 @@ #include "base/task.h" #include "base/time.h" #include "base/timer.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/common/extensions/update_manifest.h" #include "chrome/common/net/url_fetcher.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/extensions/extension_updater_unittest.cc b/chrome/browser/extensions/extension_updater_unittest.cc index b85d5d8..23b22d3 100644 --- a/chrome/browser/extensions/extension_updater_unittest.cc +++ b/chrome/browser/extensions/extension_updater_unittest.cc @@ -16,7 +16,7 @@ #include "chrome/browser/browser_thread.h" #include "chrome/browser/extensions/extension_error_reporter.h" #include "chrome/browser/extensions/extension_updater.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/test_extension_prefs.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/common/extensions/extension.h" diff --git a/chrome/browser/extensions/extension_webstore_private_api.cc b/chrome/browser/extensions/extension_webstore_private_api.cc index eabdf2f..db41e38 100644 --- a/chrome/browser/extensions/extension_webstore_private_api.cc +++ b/chrome/browser/extensions/extension_webstore_private_api.cc @@ -13,7 +13,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_prefs.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/net/gaia/token_service.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/sync/profile_sync_service.h" @@ -58,7 +58,7 @@ BrowserSignin* GetBrowserSignin(Profile* profile) { } bool IsWebStoreURL(Profile* profile, const GURL& url) { - ExtensionsService* service = profile->GetExtensionsService(); + ExtensionService* service = profile->GetExtensionService(); const Extension* store = service->GetWebStoreApp(); if (!store) { NOTREACHED(); @@ -185,7 +185,7 @@ bool GetBrowserLoginFunction::RunImpl() { bool GetStoreLoginFunction::RunImpl() { if (!IsWebStoreURL(profile_, source_url())) return false; - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); ExtensionPrefs* prefs = service->extension_prefs(); std::string login; if (prefs->GetWebStoreLogin(&login)) { @@ -201,7 +201,7 @@ bool SetStoreLoginFunction::RunImpl() { return false; std::string login; EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &login)); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); ExtensionPrefs* prefs = service->extension_prefs(); prefs->SetWebStoreLogin(login); return true; diff --git a/chrome/browser/extensions/extensions_startup.cc b/chrome/browser/extensions/extensions_startup.cc index 37a3464..8e0b855 100644 --- a/chrome/browser/extensions/extensions_startup.cc +++ b/chrome/browser/extensions/extensions_startup.cc @@ -7,7 +7,7 @@ #include "base/string_util.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_switches.h" @@ -72,14 +72,14 @@ bool ExtensionsStartupUtil::UninstallExtension(const CommandLine& cmd_line, if (!cmd_line.HasSwitch(switches::kUninstallExtension)) return false; - ExtensionsService* extensions_service = profile->GetExtensionsService(); - if (!extensions_service) + ExtensionService* extension_service = profile->GetExtensionService(); + if (!extension_service) return false; std::string extension_id = cmd_line.GetSwitchValueASCII( switches::kUninstallExtension); - if (ExtensionsService::UninstallExtensionHelper(extensions_service, - extension_id)) { + if (ExtensionService::UninstallExtensionHelper(extension_service, + extension_id)) { return true; } diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc index 630e5a9..24d7161 100644 --- a/chrome/browser/extensions/extensions_ui.cc +++ b/chrome/browser/extensions/extensions_ui.cc @@ -26,7 +26,7 @@ #include "chrome/browser/extensions/extension_function_dispatcher.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_message_service.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_updater.h" #include "chrome/browser/google/google_util.h" #include "chrome/browser/prefs/pref_service.h" @@ -293,7 +293,7 @@ void ExtensionsDOMHandler::IconLoader::ReportResultOnUIThread( // /////////////////////////////////////////////////////////////////////////////// -ExtensionsDOMHandler::ExtensionsDOMHandler(ExtensionsService* extension_service) +ExtensionsDOMHandler::ExtensionsDOMHandler(ExtensionService* extension_service) : extensions_service_(extension_service), ignore_notifications_(false), deleting_rvh_(NULL) { @@ -793,7 +793,7 @@ static bool ExtensionWantsFileAccess(const Extension* extension) { // Static DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue( - ExtensionsService* service, const Extension* extension, + ExtensionService* service, const Extension* extension, const std::vector<ExtensionPage>& pages, bool enabled) { DictionaryValue* extension_data = new DictionaryValue(); @@ -938,8 +938,8 @@ ExtensionsDOMHandler::~ExtensionsDOMHandler() { // ExtensionsDOMHandler, public: ----------------------------------------------- ExtensionsUI::ExtensionsUI(TabContents* contents) : DOMUI(contents) { - ExtensionsService *exstension_service = - GetProfile()->GetOriginalProfile()->GetExtensionsService(); + ExtensionService *exstension_service = + GetProfile()->GetOriginalProfile()->GetExtensionService(); ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); AddMessageHandler(handler); diff --git a/chrome/browser/extensions/extensions_ui.h b/chrome/browser/extensions/extensions_ui.h index 0caec5b..b7a9b69 100644 --- a/chrome/browser/extensions/extensions_ui.h +++ b/chrome/browser/extensions/extensions_ui.h @@ -22,7 +22,7 @@ class DictionaryValue; class Extension; -class ExtensionsService; +class ExtensionService; class FilePath; class ListValue; class PrefService; @@ -102,7 +102,7 @@ class ExtensionsDOMHandler ExtensionsDOMHandler* handler_; }; - explicit ExtensionsDOMHandler(ExtensionsService* extension_service); + explicit ExtensionsDOMHandler(ExtensionService* extension_service); virtual ~ExtensionsDOMHandler(); // DOMMessageHandler implementation. @@ -111,7 +111,7 @@ class ExtensionsDOMHandler // Extension Detail JSON Struct for page. (static for ease of testing). // Note: service can be NULL in unit tests. static DictionaryValue* CreateExtensionDetailValue( - ExtensionsService* service, + ExtensionService* service, const Extension* extension, const std::vector<ExtensionPage>& pages, bool enabled); @@ -223,7 +223,7 @@ class ExtensionsDOMHandler ExtensionInstallUI* GetExtensionInstallUI(); // Our model. - scoped_refptr<ExtensionsService> extensions_service_; + scoped_refptr<ExtensionService> extensions_service_; // Used to pick the directory when loading an extension. scoped_refptr<SelectFileDialog> load_extension_dialog_; diff --git a/chrome/browser/extensions/page_action_apitest.cc b/chrome/browser/extensions/page_action_apitest.cc index 2182bec..504f909 100644 --- a/chrome/browser/extensions/page_action_apitest.cc +++ b/chrome/browser/extensions/page_action_apitest.cc @@ -5,7 +5,7 @@ #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_tabs_module.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/ui/browser.h" diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc index fc01884..fcd569b 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc @@ -15,7 +15,7 @@ #include "base/task.h" #include "base/utf_string_conversions.h" // TODO(viettrungluu): delete me. #include "chrome/browser/browser_thread.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.cc b/chrome/browser/extensions/theme_installed_infobar_delegate.cc index 1d6563c..5f47084 100644 --- a/chrome/browser/extensions/theme_installed_infobar_delegate.cc +++ b/chrome/browser/extensions/theme_installed_infobar_delegate.cc @@ -9,7 +9,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/themes/browser_theme_provider.h" @@ -75,7 +75,7 @@ string16 ThemeInstalledInfoBarDelegate::GetButtonLabel( bool ThemeInstalledInfoBarDelegate::Cancel() { if (!previous_theme_id_.empty()) { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (service) { const Extension* previous_theme = service->GetExtensionById(previous_theme_id_, true); diff --git a/chrome/browser/extensions/user_script_listener.cc b/chrome/browser/extensions/user_script_listener.cc index c11da84..0123290 100644 --- a/chrome/browser/extensions/user_script_listener.cc +++ b/chrome/browser/extensions/user_script_listener.cc @@ -5,7 +5,7 @@ #include "chrome/browser/extensions/user_script_listener.h" #include "chrome/browser/browser_thread.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/global_request_id.h" #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" @@ -142,8 +142,8 @@ void UserScriptListener::Observe(NotificationType type, // Clear all our patterns and reregister all the still-loaded extensions. URLPatterns new_patterns; - ExtensionsService* service = - Source<Profile>(source).ptr()->GetExtensionsService(); + ExtensionService* service = + Source<Profile>(source).ptr()->GetExtensionService(); for (ExtensionList::const_iterator it = service->extensions()->begin(); it != service->extensions()->end(); ++it) { if (*it != unloaded_extension) diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc index 1564fe9..c1a6734 100644 --- a/chrome/browser/extensions/user_script_listener_unittest.cc +++ b/chrome/browser/extensions/user_script_listener_unittest.cc @@ -4,7 +4,7 @@ #include "base/message_loop.h" #include "base/thread.h" -#include "chrome/browser/extensions/extensions_service_unittest.h" +#include "chrome/browser/extensions/extension_service_unittest.h" #include "chrome/browser/extensions/user_script_listener.h" #include "chrome/browser/renderer_host/global_request_id.h" #include "chrome/browser/renderer_host/resource_dispatcher_host_request_info.h" @@ -104,7 +104,7 @@ class SimpleTestJob : public URLRequestTestJob { }; class UserScriptListenerTest - : public ExtensionsServiceTestBase, + : public ExtensionServiceTestBase, public net::URLRequest::Interceptor { public: UserScriptListenerTest() { @@ -116,9 +116,9 @@ class UserScriptListenerTest } virtual void SetUp() { - ExtensionsServiceTestBase::SetUp(); + ExtensionServiceTestBase::SetUp(); - InitializeEmptyExtensionsService(); + InitializeEmptyExtensionService(); service_->Init(); MessageLoop::current()->RunAllPending(); diff --git a/chrome/browser/extensions/user_script_master.cc b/chrome/browser/extensions/user_script_master.cc index b3fbbe7..3f448b9 100644 --- a/chrome/browser/extensions/user_script_master.cc +++ b/chrome/browser/extensions/user_script_master.cc @@ -15,7 +15,7 @@ #include "base/string_util.h" #include "base/thread.h" #include "base/version.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_resource.h" @@ -339,9 +339,9 @@ void UserScriptMaster::Observe(NotificationType type, case NotificationType::EXTENSION_LOADED: { // Add any content scripts inside the extension. const Extension* extension = Details<const Extension>(details).ptr(); - bool incognito_enabled = profile_->GetExtensionsService()-> + bool incognito_enabled = profile_->GetExtensionService()-> IsIncognitoEnabled(extension); - bool allow_file_access = profile_->GetExtensionsService()-> + bool allow_file_access = profile_->GetExtensionService()-> AllowFileAccess(extension); const UserScriptList& scripts = extension->content_scripts(); for (UserScriptList::const_iterator iter = scripts.begin(); @@ -374,9 +374,9 @@ void UserScriptMaster::Observe(NotificationType type, case NotificationType::EXTENSION_USER_SCRIPTS_UPDATED: { const Extension* extension = Details<const Extension>(details).ptr(); UserScriptList new_lone_scripts; - bool incognito_enabled = profile_->GetExtensionsService()-> + bool incognito_enabled = profile_->GetExtensionService()-> IsIncognitoEnabled(extension); - bool allow_file_access = profile_->GetExtensionsService()-> + bool allow_file_access = profile_->GetExtensionService()-> AllowFileAccess(extension); for (UserScriptList::iterator iter = lone_scripts_.begin(); iter != lone_scripts_.end(); ++iter) { diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc index 854c03a..293d3d2 100644 --- a/chrome/browser/first_run/first_run_win.cc +++ b/chrome/browser/first_run/first_run_win.cc @@ -25,7 +25,7 @@ #include "base/utf_string_conversions.h" #include "base/win/registry.h" #include "base/win/windows_version.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_updater.h" #include "chrome/browser/importer/importer.h" #include "chrome/browser/metrics/user_metrics.h" @@ -150,7 +150,7 @@ class FirstRunDelayedTasks : public NotificationObserver { const NotificationDetails& details) { // After processing the notification we always delete ourselves. if (type.value == NotificationType::EXTENSIONS_READY) - DoExtensionWork(Source<Profile>(source).ptr()->GetExtensionsService()); + DoExtensionWork(Source<Profile>(source).ptr()->GetExtensionService()); delete this; return; } @@ -162,7 +162,7 @@ class FirstRunDelayedTasks : public NotificationObserver { // The extension work is to basically trigger an extension update check. // If the extension specified in the master pref is older than the live // extension it will get updated which is the same as get it installed. - void DoExtensionWork(ExtensionsService* service) { + void DoExtensionWork(ExtensionService* service) { if (!service) return; service->updater()->CheckNow(); diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc index 31fcdb8..2a8e542 100644 --- a/chrome/browser/geolocation/geolocation_permission_context.cc +++ b/chrome/browser/geolocation/geolocation_permission_context.cc @@ -8,7 +8,7 @@ #include "app/resource_bundle.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_thread.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/geolocation/geolocation_content_settings_map.h" #include "chrome/browser/geolocation/geolocation_dispatcher_host_old.h" #include "chrome/browser/geolocation/geolocation_provider.h" @@ -373,7 +373,7 @@ void GeolocationPermissionContext::RequestGeolocationPermission( } DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - ExtensionsService* extensions = profile_->GetExtensionsService(); + ExtensionService* extensions = profile_->GetExtensionService(); if (extensions) { const Extension* ext = extensions->GetExtensionByURL(requesting_frame); if (!ext) diff --git a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc index 4414591..9ed0106 100644 --- a/chrome/browser/gtk/browser_actions_toolbar_gtk.cc +++ b/chrome/browser/gtk/browser_actions_toolbar_gtk.cc @@ -10,7 +10,7 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_context_menu_model.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/image_loading_tracker.h" #include "chrome/browser/gtk/cairo_cached_surface.h" #include "chrome/browser/gtk/extension_popup_gtk.h" @@ -363,7 +363,7 @@ BrowserActionsToolbarGtk::BrowserActionsToolbarGtk(Browser* browser) desired_width_(0), start_width_(0), method_factory_(this) { - ExtensionsService* extension_service = profile_->GetExtensionsService(); + ExtensionService* extension_service = profile_->GetExtensionService(); // The |extension_service| can be NULL in Incognito. if (!extension_service) return; @@ -562,7 +562,7 @@ bool BrowserActionsToolbarGtk::ShouldDisplayBrowserAction( const Extension* extension) { // Only display incognito-enabled extensions while in incognito mode. return (!profile_->IsOffTheRecord() || - profile_->GetExtensionsService()->IsIncognitoEnabled(extension)); + profile_->GetExtensionService()->IsIncognitoEnabled(extension)); } void BrowserActionsToolbarGtk::HidePopup() { diff --git a/chrome/browser/gtk/location_bar_view_gtk.cc b/chrome/browser/gtk/location_bar_view_gtk.cc index 8ca86ce..5bbb0d6 100644 --- a/chrome/browser/gtk/location_bar_view_gtk.cc +++ b/chrome/browser/gtk/location_bar_view_gtk.cc @@ -26,7 +26,7 @@ #include "chrome/browser/defaults.h" #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_tabs_module.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/gtk/bookmark_bubble_gtk.h" #include "chrome/browser/gtk/bookmark_utils_gtk.h" #include "chrome/browser/gtk/cairo_cached_surface.h" @@ -680,7 +680,7 @@ void LocationBarViewGtk::UpdateContentSettingsIcons() { void LocationBarViewGtk::UpdatePageActions() { std::vector<ExtensionAction*> page_actions; - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (!service) return; @@ -995,7 +995,7 @@ void LocationBarViewGtk::SetKeywordLabel(const std::wstring& keyword) { if (is_extension_keyword) { const TemplateURL* template_url = profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword); - const SkBitmap& bitmap = profile_->GetExtensionsService()-> + const SkBitmap& bitmap = profile_->GetExtensionService()-> GetOmniboxIcon(template_url->GetExtensionId()); GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&bitmap); gtk_image_set_from_pixbuf(GTK_IMAGE(tab_to_search_magnifier_), pixbuf); @@ -1348,7 +1348,7 @@ LocationBarViewGtk::PageActionViewGtk::PageActionViewGtk( image_.Own(gtk_image_new()); gtk_container_add(GTK_CONTAINER(event_box_.get()), image_.get()); - const Extension* extension = profile->GetExtensionsService()-> + const Extension* extension = profile->GetExtensionService()-> GetExtensionById(page_action->extension_id(), false); DCHECK(extension); @@ -1512,7 +1512,7 @@ gboolean LocationBarViewGtk::PageActionViewGtk::OnButtonPressed( event->button.button); } } else { - const Extension* extension = profile_->GetExtensionsService()-> + const Extension* extension = profile_->GetExtensionService()-> GetExtensionById(page_action()->extension_id(), false); context_menu_model_ = diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc index 530790e..0ce395d 100644 --- a/chrome/browser/net/chrome_url_request_context.cc +++ b/chrome/browser/net/chrome_url_request_context.cc @@ -11,7 +11,7 @@ #include "base/string_util.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_thread.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/io_thread.h" #include "chrome/browser/net/chrome_cookie_notification_details.h" diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc index 86a279b..d24f3d7 100644 --- a/chrome/browser/notifications/balloon_host.cc +++ b/chrome/browser/notifications/balloon_host.cc @@ -216,7 +216,7 @@ void BalloonHost::Init() { DCHECK(!render_view_host_) << "BalloonViewHost already initialized."; RenderViewHost* rvh = new RenderViewHost( site_instance_.get(), this, MSG_ROUTING_NONE, NULL); - if (GetProfile()->GetExtensionsService()) { + if (GetProfile()->GetExtensionService()) { extension_function_dispatcher_.reset( ExtensionFunctionDispatcher::Create( rvh, this, balloon_->notification().content_url())); diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc index 42faeaf..494d86f 100644 --- a/chrome/browser/notifications/desktop_notification_service.cc +++ b/chrome/browser/notifications/desktop_notification_service.cc @@ -11,7 +11,7 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/browser_child_process_host.h" #include "chrome/browser/browser_thread.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_object_proxy.h" #include "chrome/browser/notifications/notification_ui_manager.h" @@ -615,7 +615,7 @@ string16 DesktopNotificationService::DisplayNameForOrigin( const GURL& origin) { // If the source is an extension, lookup the display name. if (origin.SchemeIs(chrome::kExtensionScheme)) { - ExtensionsService* ext_service = profile_->GetExtensionsService(); + ExtensionService* ext_service = profile_->GetExtensionService(); if (ext_service) { const Extension* extension = ext_service->GetExtensionByURL(origin); if (extension) diff --git a/chrome/browser/notifications/notification_options_menu_model.cc b/chrome/browser/notifications/notification_options_menu_model.cc index 126e5ff..a100397 100644 --- a/chrome/browser/notifications/notification_options_menu_model.cc +++ b/chrome/browser/notifications/notification_options_menu_model.cc @@ -8,7 +8,7 @@ #include "base/compiler_specific.h" #include "base/logging.h" #include "chrome/browser/browser_list.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notifications_prefs_cache.h" @@ -72,8 +72,8 @@ string16 NotificationOptionsMenuModel::GetLabelForCommandId(int command_id) DesktopNotificationService* service = balloon_->profile()->GetDesktopNotificationService(); if (origin.SchemeIs(chrome::kExtensionScheme)) { - ExtensionsService* ext_service = - balloon_->profile()->GetExtensionsService(); + ExtensionService* ext_service = + balloon_->profile()->GetExtensionService(); const Extension* extension = ext_service->GetExtensionByURL(origin); if (extension) { ExtensionPrefs* extension_prefs = ext_service->extension_prefs(); @@ -121,8 +121,8 @@ bool NotificationOptionsMenuModel::GetAcceleratorForCommandId( void NotificationOptionsMenuModel::ExecuteCommand(int command_id) { DesktopNotificationService* service = balloon_->profile()->GetDesktopNotificationService(); - ExtensionsService* ext_service = - balloon_->profile()->GetExtensionsService(); + ExtensionService* ext_service = + balloon_->profile()->GetExtensionService(); const GURL& origin = balloon_->notification().origin_url(); switch (command_id) { case kTogglePermissionCommand: diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc index 83c188c..26c9a14 100644 --- a/chrome/browser/plugin_service.cc +++ b/chrome/browser/plugin_service.cc @@ -16,7 +16,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/chrome_plugin_host.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/plugin_updater.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc index f555a17f..7f6a5fd 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc @@ -214,8 +214,8 @@ class OffTheRecordProfileImpl : public Profile, return NULL; } - virtual ExtensionsService* GetExtensionsService() { - return GetOriginalProfile()->GetExtensionsService(); + virtual ExtensionService* GetExtensionService() { + return GetOriginalProfile()->GetExtensionService(); } virtual BackgroundContentsService* GetBackgroundContentsService() const { diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h index ad11285..256e5e2 100644 --- a/chrome/browser/profiles/profile.h +++ b/chrome/browser/profiles/profile.h @@ -61,7 +61,7 @@ class ExtensionEventRouter; class ExtensionInfoMap; class ExtensionMessageService; class ExtensionProcessManager; -class ExtensionsService; +class ExtensionService; class FaviconService; class FilePath; class FindBarState; @@ -195,9 +195,9 @@ class Profile { // that this method is called. virtual VisitedLinkMaster* GetVisitedLinkMaster() = 0; - // Retrieves a pointer to the ExtensionsService associated with this - // profile. The ExtensionsService is created at startup. - virtual ExtensionsService* GetExtensionsService() = 0; + // Retrieves a pointer to the ExtensionService associated with this + // profile. The ExtensionService is created at startup. + virtual ExtensionService* GetExtensionService() = 0; // Retrieves a pointer to the UserScriptMaster associated with this // profile. The UserScriptMaster is lazily created the first time @@ -340,7 +340,7 @@ class Profile { // is only used for a separate cookie store currently. virtual URLRequestContextGetter* GetRequestContextForExtensions() = 0; - // Called by the ExtensionsService that lives in this profile. Gives the + // Called by the ExtensionService that lives in this profile. Gives the // profile a chance to react to the load event before the EXTENSION_LOADED // notification has fired. The purpose for handling this event first is to // avoid race conditions by making sure URLRequestContexts learn about new @@ -348,7 +348,7 @@ class Profile { virtual void RegisterExtensionWithRequestContexts( const Extension* extension) {} - // Called by the ExtensionsService that lives in this profile. Lets the + // Called by the ExtensionService that lives in this profile. Lets the // profile clean up its RequestContexts once all the listeners to the // EXTENSION_UNLOADED notification have finished running. virtual void UnregisterExtensionWithRequestContexts( diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index f2f9cde..3312a7e 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -37,7 +37,7 @@ #include "chrome/browser/extensions/extension_message_service.h" #include "chrome/browser/extensions/extension_pref_store.h" #include "chrome/browser/extensions/extension_process_manager.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/favicon_service.h" #include "chrome/browser/file_system/browser_file_system_helper.h" @@ -352,10 +352,10 @@ void ProfileImpl::InitExtensions() { // since it isn't used anymore. user_script_master_ = new UserScriptMaster(script_dir, this); - extensions_service_ = new ExtensionsService( + extensions_service_ = new ExtensionService( this, CommandLine::ForCurrentProcess(), - GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName), + GetPath().AppendASCII(ExtensionService::kInstallDirectoryName), extension_prefs_.get(), true); @@ -401,7 +401,7 @@ void ProfileImpl::RegisterComponentExtensions() { ResourceBundle::GetSharedInstance().GetRawDataResource( iter->second).as_string(); extensions_service_->register_component_extension( - ExtensionsService::ComponentExtensionInfo(manifest, path)); + ExtensionService::ComponentExtensionInfo(manifest, path)); } } @@ -419,7 +419,7 @@ void ProfileImpl::InstallDefaultApps() { if (g_browser_process->GetApplicationLocale() != "en-US") return; - ExtensionsService* extensions_service = GetExtensionsService(); + ExtensionService* extensions_service = GetExtensionService(); const ExtensionIdSet* app_ids = extensions_service->default_apps()->GetAppsToInstall(); if (!app_ids) @@ -609,7 +609,7 @@ VisitedLinkMaster* ProfileImpl::GetVisitedLinkMaster() { return visited_link_master_.get(); } -ExtensionsService* ProfileImpl::GetExtensionsService() { +ExtensionService* ProfileImpl::GetExtensionService() { return extensions_service_.get(); } @@ -689,7 +689,7 @@ PrefService* ProfileImpl::GetPrefs() { // as early as possible. The constructor takes care of that. extension_prefs_.reset(new ExtensionPrefs( prefs_.get(), - GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName), + GetPath().AppendASCII(ExtensionService::kInstallDirectoryName), extension_pref_store)); DCHECK(!net_pref_observer_.get()); diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h index 3f4d587..3a6f945 100644 --- a/chrome/browser/profiles/profile_impl.h +++ b/chrome/browser/profiles/profile_impl.h @@ -54,7 +54,7 @@ class ProfileImpl : public Profile, virtual UserScriptMaster* GetUserScriptMaster(); virtual SSLHostState* GetSSLHostState(); virtual net::TransportSecurityState* GetTransportSecurityState(); - virtual ExtensionsService* GetExtensionsService(); + virtual ExtensionService* GetExtensionService(); virtual ExtensionDevToolsManager* GetExtensionDevToolsManager(); virtual ExtensionProcessManager* GetExtensionProcessManager(); virtual ExtensionMessageService* GetExtensionMessageService(); @@ -180,7 +180,7 @@ class ProfileImpl : public Profile, // Keep extension_prefs_ on top of extensions_service_ because the latter // maintains a pointer to the first and shall be destructed first. scoped_ptr<ExtensionPrefs> extension_prefs_; - scoped_refptr<ExtensionsService> extensions_service_; + scoped_refptr<ExtensionService> extensions_service_; scoped_refptr<UserScriptMaster> user_script_master_; scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_; scoped_ptr<ExtensionProcessManager> extension_process_manager_; diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index e2c8780..cb3eb82 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -34,7 +34,7 @@ #include "chrome/browser/extensions/extension_event_router.h" #include "chrome/browser/extensions/extension_function_dispatcher.h" #include "chrome/browser/extensions/extension_message_service.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/user_script_master.h" #include "chrome/browser/file_system/file_system_dispatcher_host.h" #include "chrome/browser/gpu_process_host.h" @@ -759,7 +759,7 @@ void BrowserRenderProcessHost::SendExtensionInfo() { return; } - ExtensionsService* service = profile()->GetExtensionsService(); + ExtensionService* service = profile()->GetExtensionService(); if (!service) return; ViewMsg_ExtensionsUpdated_Params params; diff --git a/chrome/browser/renderer_host/site_instance.cc b/chrome/browser/renderer_host/site_instance.cc index c6a660d..31f20f5 100644 --- a/chrome/browser/renderer_host/site_instance.cc +++ b/chrome/browser/renderer_host/site_instance.cc @@ -6,7 +6,7 @@ #include "chrome/browser/browsing_instance.h" #include "chrome/browser/dom_ui/dom_ui_factory.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/renderer_host/browser_render_process_host.h" #include "chrome/common/url_constants.h" #include "chrome/common/notification_service.h" @@ -187,11 +187,11 @@ bool SiteInstance::IsSameWebSite(Profile* profile, /*static*/ GURL SiteInstance::GetEffectiveURL(Profile* profile, const GURL& url) { - if (!profile || !profile->GetExtensionsService()) + if (!profile || !profile->GetExtensionService()) return url; const Extension* extension = - profile->GetExtensionsService()->GetExtensionByWebExtent(url); + profile->GetExtensionService()->GetExtensionByWebExtent(url); if (extension) { // If the URL is part of an extension's web extent, convert it to an // extension URL. diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc index 917e57b..7372262 100644 --- a/chrome/browser/search_engines/template_url_model.cc +++ b/chrome/browser/search_engines/template_url_model.cc @@ -11,7 +11,7 @@ #include "base/string_number_conversions.h" #include "base/string_split.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/history/history.h" #include "chrome/browser/history/history_notifications.h" @@ -741,7 +741,7 @@ void TemplateURLModel::NotifyLoaded() { NotificationService::NoDetails()); for (size_t i = 0; i < pending_extension_ids_.size(); ++i) { - const Extension* extension = profile_->GetExtensionsService()-> + const Extension* extension = profile_->GetExtensionService()-> GetExtensionById(pending_extension_ids_[i], true); if (extension) RegisterExtensionKeyword(extension); diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc index cefb8cf..43f677a 100644 --- a/chrome/browser/sessions/session_restore.cc +++ b/chrome/browser/sessions/session_restore.cc @@ -14,7 +14,7 @@ #include "base/scoped_ptr.h" #include "base/stl_util-inl.h" #include "base/string_util.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_service.h" #include "chrome/browser/sessions/session_types.h" diff --git a/chrome/browser/sync/glue/extension_change_processor.cc b/chrome/browser/sync/glue/extension_change_processor.cc index 9b00f4b..597db3f 100644 --- a/chrome/browser/sync/glue/extension_change_processor.cc +++ b/chrome/browser/sync/glue/extension_change_processor.cc @@ -11,7 +11,7 @@ #include "base/stl_util-inl.h" #include "chrome/browser/browser_thread.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/sync/glue/extension_sync.h" #include "chrome/browser/sync/glue/extension_util.h" #include "chrome/browser/sync/protocol/extension_specifics.pb.h" @@ -96,8 +96,8 @@ void ExtensionChangeProcessor::ApplyChangesFromSyncModel( if (!running()) { return; } - ExtensionsService* extensions_service = - GetExtensionsServiceFromProfile(profile_); + ExtensionService* extensions_service = + GetExtensionServiceFromProfile(profile_); for (int i = 0; i < change_count; ++i) { const sync_api::SyncManager::ChangeRecord& change = changes[i]; switch (change.action) { diff --git a/chrome/browser/sync/glue/extension_change_processor.h b/chrome/browser/sync/glue/extension_change_processor.h index 89428fb..4d50f8c 100644 --- a/chrome/browser/sync/glue/extension_change_processor.h +++ b/chrome/browser/sync/glue/extension_change_processor.h @@ -14,7 +14,7 @@ #include "chrome/common/notification_type.h" #include "chrome/common/notification_registrar.h" -class ExtensionsService; +class ExtensionService; class NotificationDetails; class NotificationSource; class Profile; diff --git a/chrome/browser/sync/glue/extension_sync.cc b/chrome/browser/sync/glue/extension_sync.cc index b7076ed..c14b593 100644 --- a/chrome/browser/sync/glue/extension_sync.cc +++ b/chrome/browser/sync/glue/extension_sync.cc @@ -8,7 +8,7 @@ #include "base/logging.h" #include "chrome/browser/extensions/extension_updater.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sync/engine/syncapi.h" #include "chrome/browser/sync/glue/extension_data.h" @@ -33,20 +33,20 @@ bool RootNodeHasChildren(const char* tag, return true; } -ExtensionsService* GetExtensionsServiceFromProfile( +ExtensionService* GetExtensionServiceFromProfile( Profile* profile) { CHECK(profile); - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); CHECK(extensions_service); return extensions_service; } namespace { -ExtensionsService* GetExtensionsServiceFromProfileSyncService( +ExtensionService* GetExtensionServiceFromProfileSyncService( ProfileSyncService* sync_service) { CHECK(sync_service); - return GetExtensionsServiceFromProfile(sync_service->profile()); + return GetExtensionServiceFromProfile(sync_service->profile()); } // Updates the value in |extension_data_map| from the given data, @@ -80,7 +80,7 @@ ExtensionData* SetOrCreateExtensionData( void ReadClientDataFromExtensionList( const ExtensionList& extensions, const ExtensionTypeSet& allowed_extension_types, - ExtensionsService* extensions_service, + ExtensionService* extensions_service, std::set<std::string>* unsynced_extensions, ExtensionDataMap* extension_data_map) { for (ExtensionList::const_iterator it = extensions.begin(); @@ -110,7 +110,7 @@ void ReadClientDataFromExtensionList( // enabled and disabled extensions from |extensions_service|. void SlurpClientData( const ExtensionTypeSet& allowed_extension_types, - ExtensionsService* extensions_service, + ExtensionService* extensions_service, std::set<std::string>* unsynced_extensions, ExtensionDataMap* extension_data_map) { const ExtensionList* extensions = extensions_service->extensions(); @@ -191,8 +191,8 @@ bool SlurpServerData( bool SlurpExtensionData(const ExtensionSyncTraits& traits, ProfileSyncService* sync_service, ExtensionDataMap* extension_data_map) { - ExtensionsService* extensions_service = - GetExtensionsServiceFromProfileSyncService(sync_service); + ExtensionService* extensions_service = + GetExtensionServiceFromProfileSyncService(sync_service); std::set<std::string> unsynced_extensions; // Read client-side data first so server data takes precedence, and @@ -260,7 +260,7 @@ bool UpdateServer( void TryUpdateClient( const ExtensionTypeSet& allowed_extension_types, PendingExtensionInfo::ExpectedCrxType expected_crx_type, - ExtensionsService* extensions_service, + ExtensionService* extensions_service, ExtensionData* extension_data) { DCHECK(!extension_data->NeedsUpdate(ExtensionData::SERVER)); DCHECK(extension_data->NeedsUpdate(ExtensionData::CLIENT)); @@ -307,10 +307,10 @@ void TryUpdateClient( // // TODO(akalin): Combine this with the similar function in // theme_util.cc. -void NudgeExtensionUpdater(ExtensionsService* extensions_service) { +void NudgeExtensionUpdater(ExtensionService* extensions_service) { ExtensionUpdater* extension_updater = extensions_service->updater(); // Auto-updates should now be on always (see the construction of the - // ExtensionsService in ProfileImpl::InitExtensions()). + // ExtensionService in ProfileImpl::InitExtensions()). if (extension_updater) { extension_updater->CheckNow(); } else { @@ -332,8 +332,8 @@ bool FlushExtensionData(const ExtensionSyncTraits& traits, return false; } - ExtensionsService* extensions_service = - GetExtensionsServiceFromProfileSyncService(sync_service); + ExtensionService* extensions_service = + GetExtensionServiceFromProfileSyncService(sync_service); // Update server and client as necessary. bool should_nudge_extension_updater = false; @@ -381,8 +381,8 @@ bool UpdateServerData(const ExtensionSyncTraits& traits, return false; } - ExtensionsService* extensions_service = - GetExtensionsServiceFromProfileSyncService(sync_service); + ExtensionService* extensions_service = + GetExtensionServiceFromProfileSyncService(sync_service); sync_pb::ExtensionSpecifics client_data; GetExtensionSpecifics(extension, extensions_service->extension_prefs(), &client_data); @@ -442,7 +442,7 @@ void RemoveServerData(const ExtensionSyncTraits& traits, void UpdateClient(const ExtensionSyncTraits& traits, const sync_pb::ExtensionSpecifics& server_data, - ExtensionsService* extensions_service) { + ExtensionService* extensions_service) { DcheckIsExtensionSpecificsValid(server_data); ExtensionData extension_data = ExtensionData::FromData(ExtensionData::SERVER, server_data); @@ -477,7 +477,7 @@ void UpdateClient(const ExtensionSyncTraits& traits, void RemoveFromClient(const ExtensionSyncTraits& traits, const std::string& id, - ExtensionsService* extensions_service) { + ExtensionService* extensions_service) { const Extension* extension = extensions_service->GetExtensionById(id, true); if (extension) { if (IsExtensionValidAndSyncable(*extension, diff --git a/chrome/browser/sync/glue/extension_sync.h b/chrome/browser/sync/glue/extension_sync.h index 11295c0..af7f9a5 100644 --- a/chrome/browser/sync/glue/extension_sync.h +++ b/chrome/browser/sync/glue/extension_sync.h @@ -13,7 +13,7 @@ #include <string> class Extension; -class ExtensionsService; +class ExtensionService; class Profile; class ProfileSyncService; @@ -38,7 +38,7 @@ bool RootNodeHasChildren(const char* tag, ProfileSyncService* sync_service, bool* has_children); -ExtensionsService* GetExtensionsServiceFromProfile(Profile* profile); +ExtensionService* GetExtensionServiceFromProfile(Profile* profile); // Fills |extension_data_map| with both client-side information about // installed extensions and the server-side information about @@ -74,12 +74,12 @@ void RemoveServerData(const ExtensionSyncTraits& traits, // Starts updating the client data from the given server data. void UpdateClient(const ExtensionSyncTraits& traits, const sync_pb::ExtensionSpecifics& server_data, - ExtensionsService* extensions_service); + ExtensionService* extensions_service); // Removes existing client data for the given extension. void RemoveFromClient(const ExtensionSyncTraits& traits, const std::string& id, - ExtensionsService* extensions_service); + ExtensionService* extensions_service); } // namespace browser_sync diff --git a/chrome/browser/sync/glue/extension_sync_traits.h b/chrome/browser/sync/glue/extension_sync_traits.h index 86a5a89..66bd5d6 100644 --- a/chrome/browser/sync/glue/extension_sync_traits.h +++ b/chrome/browser/sync/glue/extension_sync_traits.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_SYNC_TRAITS_H_ #pragma once -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/sync/syncable/model_type.h" #include "chrome/browser/sync/glue/extension_util.h" diff --git a/chrome/browser/sync/glue/extension_util.cc b/chrome/browser/sync/glue/extension_util.cc index a02e8fa..1ea144a 100644 --- a/chrome/browser/sync/glue/extension_util.cc +++ b/chrome/browser/sync/glue/extension_util.cc @@ -11,7 +11,7 @@ #include "base/stl_util-inl.h" #include "base/version.h" #include "chrome/browser/extensions/extension_prefs.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/sync/protocol/extension_specifics.pb.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" @@ -230,7 +230,7 @@ bool IsExtensionOutdated(const Extension& extension, void SetExtensionProperties( const sync_pb::ExtensionSpecifics& specifics, - ExtensionsService* extensions_service, const Extension* extension) { + ExtensionService* extensions_service, const Extension* extension) { DcheckIsExtensionSpecificsValid(specifics); CHECK(extensions_service); CHECK(extension); diff --git a/chrome/browser/sync/glue/extension_util.h b/chrome/browser/sync/glue/extension_util.h index a46d1fb..e87d98c 100644 --- a/chrome/browser/sync/glue/extension_util.h +++ b/chrome/browser/sync/glue/extension_util.h @@ -15,7 +15,7 @@ class Extension; class ExtensionPrefs; class ExtensionTypeSet; -class ExtensionsService; +class ExtensionService; struct UninstalledExtensionInfo; namespace sync_pb { @@ -132,7 +132,7 @@ bool IsExtensionOutdated(const Extension& extension, // valid. void SetExtensionProperties( const sync_pb::ExtensionSpecifics& specifics, - ExtensionsService* extensions_service, const Extension* extension); + ExtensionService* extensions_service, const Extension* extension); // Merge |specifics| into |merged_specifics|. Both must be valid and // have the same ID. The merge policy is currently to copy the diff --git a/chrome/browser/sync/glue/extension_util_unittest.cc b/chrome/browser/sync/glue/extension_util_unittest.cc index f8eac78..1a375ff 100644 --- a/chrome/browser/sync/glue/extension_util_unittest.cc +++ b/chrome/browser/sync/glue/extension_util_unittest.cc @@ -501,7 +501,7 @@ TEST_F(ExtensionUtilTest, IsExtensionOutdated) { EXPECT_TRUE(IsExtensionOutdated(*extension, specifics)); } -// TODO(akalin): Make ExtensionsService/ExtensionUpdater testable +// TODO(akalin): Make ExtensionService/ExtensionUpdater testable // enough to be able to write a unittest for SetExtensionProperties(). TEST_F(ExtensionUtilTest, MergeExtensionSpecificsWithUserProperties) { diff --git a/chrome/browser/sync/glue/theme_util.cc b/chrome/browser/sync/glue/theme_util.cc index 9e94632..a0a5da2 100644 --- a/chrome/browser/sync/glue/theme_util.cc +++ b/chrome/browser/sync/glue/theme_util.cc @@ -10,7 +10,7 @@ #include "base/scoped_ptr.h" #include "chrome/browser/extensions/extension_install_ui.h" #include "chrome/browser/extensions/extension_updater.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #if defined(TOOLKIT_USES_GTK) #include "chrome/browser/gtk/gtk_theme_provider.h" #endif @@ -85,7 +85,7 @@ void SetCurrentThemeFromThemeSpecifics( std::string id(theme_specifics.custom_theme_id()); GURL update_url(theme_specifics.custom_theme_update_url()); VLOG(1) << "Applying theme " << id << " with update_url " << update_url; - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); CHECK(extensions_service); const Extension* extension = extensions_service->GetExtensionById(id, true); if (extension) { @@ -138,7 +138,7 @@ void SetCurrentThemeFromThemeSpecifics( kInstallSilently, kEnableOnInstall, kEnableIncognitoOnInstall); ExtensionUpdater* extension_updater = extensions_service->updater(); // Auto-updates should now be on always (see the construction of - // the ExtensionsService in ProfileImpl::InitExtensions()). + // the ExtensionService in ProfileImpl::InitExtensions()). if (!extension_updater) { LOG(DFATAL) << "Extension updater unexpectedly NULL; " << "auto-updates may be turned off"; diff --git a/chrome/browser/sync/glue/theme_util_unittest.cc b/chrome/browser/sync/glue/theme_util_unittest.cc index 39c8a4b..575ae86 100644 --- a/chrome/browser/sync/glue/theme_util_unittest.cc +++ b/chrome/browser/sync/glue/theme_util_unittest.cc @@ -114,7 +114,7 @@ TEST_F(ThemeUtilTest, SetCurrentThemeSystemTheme) { SetCurrentThemeFromThemeSpecifics(theme_specifics, &mock_profile); } -// TODO(akalin): Make ExtensionsService/ExtensionUpdater testable +// TODO(akalin): Make ExtensionService/ExtensionUpdater testable // enough to be able to write a unittest for SetCurrentTheme for a // custom theme. diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index a0cb149..37e9855 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -25,7 +25,7 @@ #include "chrome/browser/debugger/devtools_window.h" #include "chrome/browser/download/download_manager.h" #include "chrome/browser/extensions/extension_event_router.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/fonts_languages_window.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/net/browser_url_util.h" @@ -183,7 +183,7 @@ static ExtensionMenuItem::List GetRelevantExtensionItems( void RenderViewContextMenu::AppendExtensionItems( const std::string& extension_id, int* index) { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); ExtensionMenuManager* manager = service->menu_manager(); const Extension* extension = service->GetExtensionById(extension_id, false); bool can_cross_incognito = service->CanCrossIncognito(extension); @@ -302,7 +302,7 @@ void RenderViewContextMenu::RecursivelyAppendExtensionItems( } void RenderViewContextMenu::SetExtensionIcon(const std::string& extension_id) { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); ExtensionMenuManager* menu_manager = service->menu_manager(); int index = menu_model_.GetItemCount() - 1; @@ -317,7 +317,7 @@ void RenderViewContextMenu::SetExtensionIcon(const std::string& extension_id) { void RenderViewContextMenu::AppendAllExtensionItems() { extension_item_map_.clear(); - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (!service) return; // In unit-tests, we may not have an ExtensionService. ExtensionMenuManager* menu_manager = service->menu_manager(); @@ -727,7 +727,7 @@ void RenderViewContextMenu::AppendBidiSubMenu() { ExtensionMenuItem* RenderViewContextMenu::GetExtensionMenuItem(int id) const { ExtensionMenuManager* manager = - profile_->GetExtensionsService()->menu_manager(); + profile_->GetExtensionService()->menu_manager(); std::map<int, ExtensionMenuItem::Id>::const_iterator i = extension_item_map_.find(id); if (i != extension_item_map_.end()) { @@ -1084,7 +1084,7 @@ void RenderViewContextMenu::ExecuteCommand(int id) { if (id >= IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST && id <= IDC_EXTENSIONS_CONTEXT_CUSTOM_LAST) { ExtensionMenuManager* manager = - profile_->GetExtensionsService()->menu_manager(); + profile_->GetExtensionService()->menu_manager(); std::map<int, ExtensionMenuItem::Id>::const_iterator i = extension_item_map_.find(id); if (i != extension_item_map_.end()) { diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc index 6714e29..408e490 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -9,7 +9,7 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/background_contents_service.h" #include "chrome/browser/character_encoding.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" @@ -37,7 +37,7 @@ RenderViewHostDelegateViewHelper::MaybeCreateBackgroundContents( SiteInstance* site, const GURL& opener_url, const string16& frame_name) { - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); if (!opener_url.is_valid() || frame_name.empty() || diff --git a/chrome/browser/tab_contents/render_view_host_manager.cc b/chrome/browser/tab_contents/render_view_host_manager.cc index af2b9e5..bcc9a78 100644 --- a/chrome/browser/tab_contents/render_view_host_manager.cc +++ b/chrome/browser/tab_contents/render_view_host_manager.cc @@ -8,7 +8,7 @@ #include "base/logging.h" #include "chrome/browser/dom_ui/dom_ui.h" #include "chrome/browser/dom_ui/dom_ui_factory.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_view_host_delegate.h" @@ -480,8 +480,8 @@ bool RenderViewHostManager::InitRenderView(RenderViewHost* render_view_host, // Tell the RenderView whether it will be used for an extension process. Profile* profile = delegate_->GetControllerForRenderManager().profile(); - bool is_extension_process = profile->GetExtensionsService() && - profile->GetExtensionsService()->ExtensionBindingsAllowed(entry.url()); + bool is_extension_process = profile->GetExtensionService() && + profile->GetExtensionService()->ExtensionBindingsAllowed(entry.url()); render_view_host->set_is_extension_process(is_extension_process); return delegate_->CreateRenderViewForRenderManager(render_view_host); diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index e6f0cd7..4215528 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -39,7 +39,7 @@ #include "chrome/browser/download/download_manager.h" #include "chrome/browser/download/download_request_limiter.h" #include "chrome/browser/external_protocol_handler.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/history/history_types.h" #include "chrome/browser/history/top_sites.h" #include "chrome/browser/host_zoom_map.h" @@ -595,7 +595,7 @@ void TabContents::SetExtensionAppById(const std::string& extension_app_id) { if (extension_app_id.empty()) return; - ExtensionsService* extension_service = profile()->GetExtensionsService(); + ExtensionService* extension_service = profile()->GetExtensionService(); if (!extension_service || !extension_service->is_ready()) return; @@ -1684,7 +1684,7 @@ void TabContents::DidNavigateMainFramePostCommit( // Clear all page actions, blocked content notifications and browser actions // for this tab, unless this is an in-page navigation. if (!details.is_in_page) { - ExtensionsService* service = profile()->GetExtensionsService(); + ExtensionService* service = profile()->GetExtensionService(); if (service) { for (size_t i = 0; i < service->extensions()->size(); ++i) { ExtensionAction* browser_action = @@ -3243,7 +3243,7 @@ void TabContents::UpdateExtensionAppIcon(const Extension* extension) { } const Extension* TabContents::GetExtensionContaining(const GURL& url) { - ExtensionsService* extensions_service = profile()->GetExtensionsService(); + ExtensionService* extensions_service = profile()->GetExtensionService(); if (!extensions_service) return NULL; diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index 10fd044..c79b10e 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -14,7 +14,7 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/browser_shutdown.h" #include "chrome/browser/defaults.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_process_host.h" diff --git a/chrome/browser/task_manager/task_manager_browsertest.cc b/chrome/browser/task_manager/task_manager_browsertest.cc index 60657e2..68a4f94 100644 --- a/chrome/browser/task_manager/task_manager_browsertest.cc +++ b/chrome/browser/task_manager/task_manager_browsertest.cc @@ -11,7 +11,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/crashed_extension_infobar.h" #include "chrome/browser/extensions/extension_browsertest.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_test_util.h" @@ -216,7 +216,7 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeAppTabs) { ASSERT_TRUE(LoadExtension( test_data_dir_.AppendASCII("packaged_app"))); - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const Extension* extension = service->GetExtensionById(last_loaded_extension_id_, false); diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc index 27ce650..47819e3 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.cc +++ b/chrome/browser/task_manager/task_manager_resource_providers.cc @@ -24,7 +24,7 @@ #include "chrome/browser/browser_thread.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_process_manager.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/notifications/balloon_collection.h" #include "chrome/browser/notifications/balloon_host.h" #include "chrome/browser/notifications/notification_ui_manager.h" @@ -174,8 +174,8 @@ std::wstring TaskManagerTabContentsResource::GetTitle() const { base::i18n::AdjustStringForLocaleDirection(&tab_title); } - ExtensionsService* extensions_service = - tab_contents_->profile()->GetExtensionsService(); + ExtensionService* extensions_service = + tab_contents_->profile()->GetExtensionService(); int message_id = GetMessagePrefixID( extensions_service->IsInstalledApp(tab_contents_->GetURL()), tab_contents_->HostsExtension(), @@ -193,8 +193,8 @@ TabContents* TaskManagerTabContentsResource::GetTabContents() const { const Extension* TaskManagerTabContentsResource::GetExtension() const { if (tab_contents_->HostsExtension()) { - ExtensionsService* extensions_service = - tab_contents_->profile()->GetExtensionsService(); + ExtensionService* extensions_service = + tab_contents_->profile()->GetExtensionService(); return extensions_service->GetExtensionByURL(tab_contents_->GetURL()); } @@ -474,7 +474,7 @@ void TaskManagerBackgroundContentsResourceProvider::StartUpdating() { it != profile_manager->end(); ++it) { BackgroundContentsService* background_contents_service = (*it)->GetBackgroundContentsService(); - ExtensionsService* extensions_service = (*it)->GetExtensionsService(); + ExtensionService* extensions_service = (*it)->GetExtensionService(); std::vector<BackgroundContents*> contents = background_contents_service->GetBackgroundContents(); for (std::vector<BackgroundContents*>::iterator iterator = contents.begin(); @@ -574,8 +574,8 @@ void TaskManagerBackgroundContentsResourceProvider::Observe( // except in rare cases when an extension is being unloaded or chrome is // exiting while the task manager is displayed. std::wstring application_name; - ExtensionsService* service = - Source<Profile>(source)->GetExtensionsService(); + ExtensionService* service = + Source<Profile>(source)->GetExtensionService(); if (service) { std::string application_id = UTF16ToUTF8( Details<BackgroundContentsOpenedDetails>(details)->application_id); diff --git a/chrome/browser/themes/browser_theme_provider.cc b/chrome/browser/themes/browser_theme_provider.cc index 36763bb..1f70532 100644 --- a/chrome/browser/themes/browser_theme_provider.cc +++ b/chrome/browser/themes/browser_theme_provider.cc @@ -8,7 +8,7 @@ #include "base/string_split.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/browser_theme_pack.h" @@ -304,7 +304,7 @@ void BrowserThemeProvider::SetTheme(const Extension* extension) { void BrowserThemeProvider::RemoveUnusedThemes() { if (!profile_) return; - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (!service) return; std::string current_theme = GetThemeID(); @@ -558,7 +558,7 @@ void BrowserThemeProvider::LoadThemePrefs() { } else { // TODO(erg): We need to pop up a dialog informing the user that their // theme is being migrated. - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (service) { const Extension* extension = service->GetExtensionById(current_id, false); diff --git a/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc b/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc index 0aba84b..a486abb 100644 --- a/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc +++ b/chrome/browser/ui/app_modal_dialogs/message_box_handler.cc @@ -10,7 +10,7 @@ #include "base/i18n/rtl.h" #include "base/utf_string_conversions.h" #include "build/build_config.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" @@ -25,7 +25,7 @@ static std::wstring GetTitle(Profile* profile, bool is_alert, const GURL& frame_url) { - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); if (extensions_service) { const Extension* extension = extensions_service->GetExtensionByURL(frame_url); diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index b86cca5..b5bdd630 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -51,7 +51,7 @@ #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_prefs.h" #include "chrome/browser/extensions/extension_tabs_module.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_util.h" @@ -493,7 +493,7 @@ void Browser::OpenURLOffTheRecord(Profile* profile, const GURL& url) { TabContents* Browser::OpenApplication(Profile* profile, const std::string& app_id, TabContents* existing_tab) { - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); // If the extension with |app_id| could't be found, most likely because it // was uninstalled. @@ -618,7 +618,7 @@ TabContents* Browser::OpenApplicationTab(Profile* profile, return contents; // Check the prefs for overridden mode. - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); DCHECK(extensions_service); ExtensionPrefs::LaunchType launch_type = @@ -3039,7 +3039,7 @@ void Browser::OnStartDownload(DownloadItem* download, TabContents* tab) { #if defined(OS_CHROMEOS) // Don't show content browser for extension/theme downloads from gallery. if (download->is_extension_install()) { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (service && service->IsDownloadFromGallery(download->url(), download->referrer_url())) { return; @@ -3063,7 +3063,7 @@ void Browser::OnStartDownload(DownloadItem* download, TabContents* tab) { // For non-theme extensions, we don't show the download animation. if (download->is_extension_install() && - !ExtensionsService::IsDownloadFromMiniGallery(download->url())) + !ExtensionService::IsDownloadFromMiniGallery(download->url())) return; TabContents* current_tab = GetSelectedTabContents(); @@ -3165,7 +3165,7 @@ void Browser::OnDidGetApplicationInfo(TabContents* tab_contents, void Browser::OnInstallApplication(TabContents* source, const WebApplicationInfo& web_app) { - ExtensionsService* extensions_service = profile()->GetExtensionsService(); + ExtensionService* extensions_service = profile()->GetExtensionService(); if (!extensions_service) return; @@ -3225,7 +3225,7 @@ void Browser::Observe(NotificationType type, // Show the UI if the extension was disabled for escalated permissions. Profile* profile = Source<Profile>(source).ptr(); if (profile_->IsSameProfile(profile)) { - ExtensionsService* service = profile->GetExtensionsService(); + ExtensionService* service = profile->GetExtensionService(); DCHECK(service); const Extension* extension = Details<const Extension>(details).ptr(); if (service->extension_prefs()->DidExtensionEscalatePermissions( @@ -3259,8 +3259,8 @@ void Browser::Observe(NotificationType type, TabContents* tab_contents = GetSelectedTabContents(); if (!tab_contents) break; - ExtensionsService* extensions_service = - Source<Profile>(source).ptr()->GetExtensionsService(); + ExtensionService* extensions_service = + Source<Profile>(source).ptr()->GetExtensionService(); ExtensionHost* extension_host = Details<ExtensionHost>(details).ptr(); tab_contents->AddInfoBar(new CrashedExtensionInfoBarDelegate( tab_contents, extensions_service, extension_host->extension())); @@ -3307,7 +3307,7 @@ void Browser::Observe(NotificationType type, // the download_url GURL instead. This means that themes in the extensions // gallery won't get the loading dialog. GURL download_url = *(Details<GURL>(details).ptr()); - if (ExtensionsService::IsDownloadFromMiniGallery(download_url)) + if (ExtensionService::IsDownloadFromMiniGallery(download_url)) window()->ShowThemeInstallBubble(); break; } @@ -3495,7 +3495,7 @@ void Browser::InitCommandState() { command_updater_.UpdateCommandEnabled(IDC_INTERNET_OPTIONS, true); #endif - ExtensionsService* extensions_service = profile()->GetExtensionsService(); + ExtensionService* extensions_service = profile()->GetExtensionService(); bool enable_extensions = extensions_service && extensions_service->extensions_enabled(); command_updater_.UpdateCommandEnabled(IDC_MANAGE_EXTENSIONS, diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h index f6f2553..3a95ff2 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h @@ -227,7 +227,7 @@ class Browser : public TabHandlerDelegate, // Open an application specified by |app_id| in the appropriate launch // container. |existing_tab| is reused if it is not NULL and the launch // container is a tab. Returns NULL if the app_id is invalid or if - // ExtensionsService isn't ready/available. + // ExtensionService isn't ready/available. static TabContents* OpenApplication(Profile* profile, const std::string& app_id, TabContents* existing_tab); diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc index 640cbee..7747c8a 100644 --- a/chrome/browser/ui/browser_init.cc +++ b/chrome/browser/ui/browser_init.cc @@ -29,7 +29,7 @@ #include "chrome/browser/child_process_security_policy.h" #include "chrome/browser/defaults.h" #include "chrome/browser/extensions/extension_creator.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/pack_extension_job.h" #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/net/predictor_api.h" @@ -632,7 +632,7 @@ bool BrowserInit::LaunchWithProfile::OpenApplicationWindow(Profile* profile) { // TODO(skerner): Do something reasonable here. Pop up a warning panel? // Open an URL to the gallery page of the extension id? if (!app_id.empty()) { - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); const Extension* extension = extensions_service->GetExtensionById(app_id, false); diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h index 1c8b700..1f19863 100644 --- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h +++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.h @@ -17,7 +17,7 @@ class Browser; class Extension; @class ExtensionPopupController; class ExtensionToolbarModel; -class ExtensionsServiceObserverBridge; +class ExtensionServiceObserverBridge; @class MenuButton; class PrefService; class Profile; @@ -41,8 +41,8 @@ extern NSString* const kBrowserActionVisibilityChangedNotification; // The model that tracks the order of the toolbar icons. Weak. ExtensionToolbarModel* toolbarModel_; - // The observer for the ExtensionsService we're getting events from. - scoped_ptr<ExtensionsServiceObserverBridge> observer_; + // The observer for the ExtensionService we're getting events from. + scoped_ptr<ExtensionServiceObserverBridge> observer_; // A dictionary of Extension ID -> BrowserActionButton pairs representing the // buttons present in the container view. The ID is a string unique to each diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm index e0d7b87..03a9f0f 100644 --- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm +++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm @@ -12,7 +12,7 @@ #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_toolbar_model.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" @@ -176,10 +176,10 @@ const CGFloat kBrowserActionBubbleYOffset = 3.0; // A helper class to proxy extension notifications to the view controller's // appropriate methods. -class ExtensionsServiceObserverBridge : public NotificationObserver, +class ExtensionServiceObserverBridge : public NotificationObserver, public ExtensionToolbarModel::Observer { public: - ExtensionsServiceObserverBridge(BrowserActionsController* owner, + ExtensionServiceObserverBridge(BrowserActionsController* owner, Profile* profile) : owner_(owner) { registrar_.Add(this, NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE, Source<Profile>(profile)); @@ -220,7 +220,7 @@ class ExtensionsServiceObserverBridge : public NotificationObserver, // Used for registering to receive notifications and automatic clean up. NotificationRegistrar registrar_; - DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceObserverBridge); + DISALLOW_COPY_AND_ASSIGN(ExtensionServiceObserverBridge); }; @implementation BrowserActionsController @@ -242,8 +242,8 @@ class ExtensionsServiceObserverBridge : public NotificationObserver, prefs::kBrowserActionContainerWidth)) [BrowserActionsController registerUserPrefs:profile_->GetPrefs()]; - observer_.reset(new ExtensionsServiceObserverBridge(self, profile_)); - ExtensionsService* extensionsService = profile_->GetExtensionsService(); + observer_.reset(new ExtensionServiceObserverBridge(self, profile_)); + ExtensionService* extensionsService = profile_->GetExtensionService(); // |extensionsService| can be NULL in Incognito. if (extensionsService) { toolbarModel_ = extensionsService->toolbar_model(); @@ -747,7 +747,7 @@ class ExtensionsServiceObserverBridge : public NotificationObserver, - (BOOL)shouldDisplayBrowserAction:(const Extension*)extension { // Only display incognito-enabled extensions while in incognito mode. return (!profile_->IsOffTheRecord() || - profile_->GetExtensionsService()->IsIncognitoEnabled(extension)); + profile_->GetExtensionService()->IsIncognitoEnabled(extension)); } - (void)showChevronIfNecessaryInFrame:(NSRect)frame animate:(BOOL)animate { diff --git a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm index ff97fd7..5317f172 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm @@ -9,7 +9,7 @@ #include "base/task.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/extensions/extension_install_ui.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_tabs_module.h" #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/browser/prefs/pref_service.h" @@ -47,7 +47,7 @@ class AsyncUninstaller : public ExtensionInstallUI::Delegate { // Overridden by ExtensionInstallUI::Delegate. virtual void InstallUIProceed() { - profile_->GetExtensionsService()-> + profile_->GetExtensionService()-> UninstallExtension(extension_->id(), false); } @@ -216,7 +216,7 @@ int CurrentTabId() { break; } case kExtensionContextDisable: { - ExtensionsService* extensionService = profile_->GetExtensionsService(); + ExtensionService* extensionService = profile_->GetExtensionService(); if (!extensionService) return; // Incognito mode. extensionService->DisableExtension(extension_->id()); diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm index 298711e..992dd2c 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller_unittest.mm @@ -7,7 +7,7 @@ #include "chrome/browser/extensions/extension_pref_store.h" #include "chrome/browser/extensions/extension_prefs.h" #include "chrome/browser/extensions/extension_process_manager.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/ui/cocoa/browser_test_helper.h" #include "chrome/browser/ui/cocoa/cocoa_test_helper.h" #include "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h" @@ -20,19 +20,19 @@ class ExtensionTestingProfile : public TestingProfile { ExtensionTestingProfile() {} FilePath GetExtensionsInstallDir() { - return GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName); + return GetPath().AppendASCII(ExtensionService::kInstallDirectoryName); } void InitExtensionProfile() { DCHECK(!GetExtensionProcessManager()); - DCHECK(!GetExtensionsService()); + DCHECK(!GetExtensionService()); manager_.reset(ExtensionProcessManager::Create(this)); ExtensionPrefStore* pref_store = new ExtensionPrefStore; extension_prefs_.reset(new ExtensionPrefs(GetPrefs(), GetExtensionsInstallDir(), pref_store)); - service_ = new ExtensionsService(this, + service_ = new ExtensionService(this, CommandLine::ForCurrentProcess(), GetExtensionsInstallDir(), extension_prefs_.get(), @@ -53,14 +53,14 @@ class ExtensionTestingProfile : public TestingProfile { return manager_.get(); } - virtual ExtensionsService* GetExtensionsService() { + virtual ExtensionService* GetExtensionService() { return service_.get(); } private: scoped_ptr<ExtensionProcessManager> manager_; scoped_ptr<ExtensionPrefs> extension_prefs_; - scoped_refptr<ExtensionsService> service_; + scoped_refptr<ExtensionService> service_; DISALLOW_COPY_AND_ASSIGN(ExtensionTestingProfile); }; diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm index f1a69af..72f3172 100644 --- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm +++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm @@ -22,7 +22,7 @@ #include "chrome/browser/content_setting_bubble_model.h" #include "chrome/browser/defaults.h" #include "chrome/browser/extensions/extension_browser_event_router.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_tabs_module.h" #include "chrome/browser/instant/instant_controller.h" #include "chrome/browser/profiles/profile.h" @@ -528,7 +528,7 @@ NSImage* LocationBarViewMac::GetKeywordImage(const std::wstring& keyword) { const TemplateURL* template_url = profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword); if (template_url && template_url->IsExtensionKeyword()) { - const SkBitmap& bitmap = profile_->GetExtensionsService()-> + const SkBitmap& bitmap = profile_->GetExtensionService()-> GetOmniboxIcon(template_url->GetExtensionId()); return gfx::SkBitmapToNSImage(bitmap); } @@ -587,7 +587,7 @@ void LocationBarViewMac::RefreshPageActionDecorations() { return; } - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (!service) return; diff --git a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm index 9f4d801..019492d 100644 --- a/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm +++ b/chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm @@ -8,7 +8,7 @@ #include "base/sys_string_conversions.h" #include "chrome/browser/extensions/extension_browser_event_router.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/tab_contents/tab_contents.h" #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" @@ -39,7 +39,7 @@ PageActionDecoration::PageActionDecoration( current_tab_id_(-1), preview_enabled_(false) { DCHECK(profile); - const Extension* extension = profile->GetExtensionsService()-> + const Extension* extension = profile->GetExtensionService()-> GetExtensionById(page_action->extension_id(), false); DCHECK(extension); @@ -216,7 +216,7 @@ NSPoint PageActionDecoration::GetBubblePointInFrame(NSRect frame) { NSMenu* PageActionDecoration::GetMenu() { if (!profile_) return nil; - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (!service) return nil; const Extension* extension = service->GetExtensionById( diff --git a/chrome/browser/ui/cocoa/preferences_window_controller.mm b/chrome/browser/ui/cocoa/preferences_window_controller.mm index 6551bd9..f279c57 100644 --- a/chrome/browser/ui/cocoa/preferences_window_controller.mm +++ b/chrome/browser/ui/cocoa/preferences_window_controller.mm @@ -21,7 +21,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/download/download_manager.h" #include "chrome/browser/download/download_prefs.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/google/google_util.h" #include "chrome/browser/instant/instant_confirm_dialog.h" #include "chrome/browser/instant/instant_controller.h" diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc index c2512f2..1f6f61c 100644 --- a/chrome/browser/ui/views/browser_actions_container.cc +++ b/chrome/browser/ui/views/browser_actions_container.cc @@ -14,7 +14,7 @@ #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_tabs_module.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_widget_host_view.h" @@ -361,8 +361,8 @@ BrowserActionsContainer::BrowserActionsContainer(Browser* browser, ALLOW_THIS_IN_INITIALIZER_LIST(show_menu_task_factory_(this)) { SetID(VIEW_ID_BROWSER_ACTION_TOOLBAR); - if (profile_->GetExtensionsService()) { - model_ = profile_->GetExtensionsService()->toolbar_model(); + if (profile_->GetExtensionService()) { + model_ = profile_->GetExtensionService()->toolbar_model(); model_->AddObserver(this); } @@ -836,7 +836,7 @@ void BrowserActionsContainer::ExtensionPopupIsClosing(ExtensionPopup* popup) { void BrowserActionsContainer::MoveBrowserAction(const std::string& extension_id, size_t new_index) { - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (service) { const Extension* extension = service->GetExtensionById(extension_id, false); model_->MoveBrowserAction(extension, new_index); @@ -916,7 +916,7 @@ void BrowserActionsContainer::BrowserActionAdded(const Extension* extension, // Enlarge the container if it was already at maximum size and we're not in // the middle of upgrading. if ((model_->GetVisibleIconCount() < 0) && - !profile_->GetExtensionsService()->IsBeingUpgraded(extension)) { + !profile_->GetExtensionService()->IsBeingUpgraded(extension)) { suppress_chevron_ = true; SaveDesiredSizeAndAnimate(Tween::LINEAR, visible_actions + 1); } else { @@ -941,7 +941,7 @@ void BrowserActionsContainer::BrowserActionRemoved(const Extension* extension) { // If the extension is being upgraded we don't want the bar to shrink // because the icon is just going to get re-added to the same location. - if (profile_->GetExtensionsService()->IsBeingUpgraded(extension)) + if (profile_->GetExtensionService()->IsBeingUpgraded(extension)) return; if (browser_action_views_.size() > visible_actions) { @@ -1096,5 +1096,5 @@ bool BrowserActionsContainer::ShouldDisplayBrowserAction( const Extension* extension) { // Only display incognito-enabled extensions while in incognito mode. return (!profile_->IsOffTheRecord() || - profile_->GetExtensionsService()->IsIncognitoEnabled(extension)); + profile_->GetExtensionService()->IsIncognitoEnabled(extension)); } diff --git a/chrome/browser/ui/views/browser_actions_container_browsertest.cc b/chrome/browser/ui/views/browser_actions_container_browsertest.cc index 6b9ce5c..8751881 100644 --- a/chrome/browser/ui/views/browser_actions_container_browsertest.cc +++ b/chrome/browser/ui/views/browser_actions_container_browsertest.cc @@ -4,7 +4,7 @@ #include "chrome/browser/extensions/browser_action_test_util.h" #include "chrome/browser/extensions/extension_browsertest.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/views/browser_actions_container.h" @@ -229,7 +229,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionsContainerTest, ForceHide) { std::string idA = browser_actions_bar()->GetExtensionId(0); // Force hide this browser action. - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); service->SetBrowserActionVisibility(service->GetExtensionById(idA, false), false); EXPECT_EQ(0, browser_actions_bar()->VisibleBrowserActions()); @@ -243,7 +243,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionsContainerTest, ForceHide) { IN_PROC_BROWSER_TEST_F(BrowserActionsContainerTest, TestCrash57536) { LOG(INFO) << "Test starting\n" << std::flush; - ExtensionsService* service = browser()->profile()->GetExtensionsService(); + ExtensionService* service = browser()->profile()->GetExtensionService(); const size_t size_before = service->extensions()->size(); LOG(INFO) << "Loading extension\n" << std::flush; diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index 1babc92..b033a15 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc @@ -19,7 +19,7 @@ #include "chrome/browser/autocomplete/autocomplete_popup_model.h" #include "chrome/browser/defaults.h" #include "chrome/browser/extensions/extension_browser_event_router.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/instant/instant_controller.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/render_widget_host_view.h" @@ -529,7 +529,7 @@ void LocationBarView::Layout() { const TemplateURL* template_url = profile_->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword); if (template_url && template_url->IsExtensionKeyword()) { - const SkBitmap& bitmap = profile_->GetExtensionsService()-> + const SkBitmap& bitmap = profile_->GetExtensionService()-> GetOmniboxIcon(template_url->GetExtensionId()); selected_keyword_view_->SetImage(bitmap); selected_keyword_view_->SetItemPadding(kExtensionItemPadding); @@ -954,7 +954,7 @@ void LocationBarView::RefreshPageActionViews() { if (mode_ != NORMAL) return; - ExtensionsService* service = profile_->GetExtensionsService(); + ExtensionService* service = profile_->GetExtensionService(); if (!service) return; diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc index c149aca..0b0bf35 100644 --- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc +++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc @@ -7,7 +7,7 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/extensions/extension_browser_event_router.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/views/frame/browser_view.h" #include "chrome/browser/views/location_bar/location_bar_view.h" @@ -26,7 +26,7 @@ PageActionImageView::PageActionImageView(LocationBarView* owner, current_tab_id_(-1), preview_enabled_(false), popup_(NULL) { - const Extension* extension = profile->GetExtensionsService()-> + const Extension* extension = profile->GetExtensionService()-> GetExtensionById(page_action->extension_id(), false); DCHECK(extension); @@ -146,7 +146,7 @@ bool PageActionImageView::OnKeyPressed(const views::KeyEvent& e) { void PageActionImageView::ShowContextMenu(const gfx::Point& p, bool is_mouse_gesture) { - const Extension* extension = profile_->GetExtensionsService()-> + const Extension* extension = profile_->GetExtensionService()-> GetExtensionById(page_action()->extension_id(), false); Browser* browser = BrowserView::GetBrowserViewForNativeWindow( platform_util::GetTopLevel(GetWidget()->GetNativeView()))->browser(); diff --git a/chrome/browser/web_resource/web_resource_service.cc b/chrome/browser/web_resource/web_resource_service.cc index e1de48a..ebe21bc 100644 --- a/chrome/browser/web_resource/web_resource_service.cc +++ b/chrome/browser/web_resource/web_resource_service.cc @@ -13,7 +13,7 @@ #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_thread.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sync/sync_ui_util.h" #include "chrome/common/chrome_switches.h" @@ -505,7 +505,7 @@ bool CanShowPromo(Profile* profile) { promo_closed = prefs->GetBoolean(prefs::kNTPPromoClosed); bool has_extensions = false; - ExtensionsService* extensions_service = profile->GetExtensionsService(); + ExtensionService* extensions_service = profile->GetExtensionService(); if (extensions_service) { const ExtensionList* extensions = extensions_service->extensions(); for (ExtensionList::const_iterator iter = extensions->begin(); diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index dc082a3..bca8996 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -1150,6 +1150,8 @@ 'browser/extensions/extension_proxy_api.h', 'browser/extensions/extension_rlz_module.cc', 'browser/extensions/extension_rlz_module.h', + 'browser/extensions/extension_service.cc', + 'browser/extensions/extension_service.h', 'browser/extensions/extension_sidebar_api.cc', 'browser/extensions/extension_sidebar_api.h', 'browser/extensions/extension_tabs_module.cc', @@ -1180,8 +1182,6 @@ 'browser/extensions/extension_webstore_private_api.h', 'browser/extensions/extensions_quota_service.cc', 'browser/extensions/extensions_quota_service.h', - 'browser/extensions/extensions_service.cc', - 'browser/extensions/extensions_service.h', 'browser/extensions/extensions_startup.cc', 'browser/extensions/extensions_startup.h', 'browser/extensions/extensions_ui.cc', diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index c7db163..0f20285 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -1137,12 +1137,12 @@ 'browser/extensions/extension_prefs_unittest.cc', 'browser/extensions/extension_process_manager_unittest.cc', 'browser/extensions/extension_omnibox_unittest.cc', + 'browser/extensions/extension_service_unittest.cc', + 'browser/extensions/extension_service_unittest.h', 'browser/extensions/extension_ui_unittest.cc', 'browser/extensions/extension_updater_unittest.cc', 'browser/extensions/extension_webnavigation_unittest.cc', 'browser/extensions/extensions_quota_service_unittest.cc', - 'browser/extensions/extensions_service_unittest.cc', - 'browser/extensions/extensions_service_unittest.h', 'browser/extensions/external_policy_extension_provider_unittest.cc', 'browser/extensions/file_reader_unittest.cc', 'browser/extensions/image_loading_tracker_unittest.cc', diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h index 0d171d8..8fa35d5 100644 --- a/chrome/common/extensions/extension.h +++ b/chrome/common/extensions/extension.h @@ -296,8 +296,8 @@ class Extension : public base::RefCountedThreadSafe<Extension> { // Returns the url prefix for the extension/apps gallery. Can be set via the // --apps-gallery-url switch. The URL returned will not contain a trailing // slash. Do not use this as a prefix/extent for the store. Instead see - // ExtensionsService::GetWebStoreApp or - // ExtensionsService::IsDownloadFromGallery + // ExtensionService::GetWebStoreApp or + // ExtensionService::IsDownloadFromGallery static std::string ChromeStoreLaunchURL(); // Helper function that consolidates the check for whether the script can @@ -691,7 +691,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> { // The Omnibox keyword for this extension, or empty if there is none. std::string omnibox_keyword_; - FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, + FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, UpdateExtensionPreservesLocation); FRIEND_TEST_ALL_PREFIXES(ExtensionTest, LoadPageActionHelper); FRIEND_TEST_ALL_PREFIXES(ExtensionTest, InitFromValueInvalid); diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc index f2350cc..e8636be 100644 --- a/chrome/common/extensions/extension_file_util.cc +++ b/chrome/common/extensions/extension_file_util.cc @@ -77,7 +77,7 @@ void UninstallExtension(const FilePath& extensions_dir, const std::string& id) { // We don't care about the return value. If this fails (and it can, due to // plugins that aren't unloaded yet, it will get cleaned up by - // ExtensionsService::GarbageCollectExtensions). + // ExtensionService::GarbageCollectExtensions). file_util::Delete(extensions_dir.AppendASCII(id), true); // recursive. } diff --git a/chrome/common/extensions/extension_file_util_unittest.cc b/chrome/common/extensions/extension_file_util_unittest.cc index 230712d..3f59da6 100644 --- a/chrome/common/extensions/extension_file_util_unittest.cc +++ b/chrome/common/extensions/extension_file_util_unittest.cc @@ -239,5 +239,5 @@ TEST(ExtensionFileUtil, ExtensionURLToRelativeFilePath) { } // TODO(aa): More tests as motivation allows. Maybe steal some from -// ExtensionsService? Many of them could probably be tested here without the +// ExtensionService? Many of them could probably be tested here without the // MessageLoop shenanigans. diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h index 2ea5c9a..7f01898 100644 --- a/chrome/common/notification_type.h +++ b/chrome/common/notification_type.h @@ -867,7 +867,7 @@ class NotificationType { // uninstalled or disabled. The details are an Extension, and the source is // a Profile. // - // Note that when this notification is sent, ExtensionsService has already + // Note that when this notification is sent, ExtensionService has already // removed the extension from its internal state. EXTENSION_UNLOADED, diff --git a/chrome/test/live_sync/live_extensions_sync_test.cc b/chrome/test/live_sync/live_extensions_sync_test.cc index d937ba0..258b82e 100644 --- a/chrome/test/live_sync/live_extensions_sync_test.cc +++ b/chrome/test/live_sync/live_extensions_sync_test.cc @@ -9,7 +9,7 @@ #include "base/logging.h" #include "base/ref_counted.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/browser_theme_provider.h" #include "chrome/common/extensions/extension.h" @@ -38,7 +38,7 @@ enum ExtensionState { DISABLED, PENDING, ENABLED }; typedef std::map<std::string, ExtensionState> ExtensionStateMap; -ExtensionStateMap GetExtensionStates(ExtensionsService* extensions_service) { +ExtensionStateMap GetExtensionStates(ExtensionService* extensions_service) { ExtensionStateMap extension_states; const ExtensionList* extensions = extensions_service->extensions(); @@ -69,8 +69,8 @@ ExtensionStateMap GetExtensionStates(ExtensionsService* extensions_service) { bool LiveExtensionsSyncTest::HasSameExtensionsHelper( Profile* profile1, Profile* profile2) { ExtensionStateMap extension_states1( - GetExtensionStates(profile1->GetExtensionsService())); + GetExtensionStates(profile1->GetExtensionService())); ExtensionStateMap extension_states2( - GetExtensionStates(profile2->GetExtensionsService())); + GetExtensionStates(profile2->GetExtensionService())); return extension_states1 == extension_states2; } diff --git a/chrome/test/live_sync/live_extensions_sync_test_base.cc b/chrome/test/live_sync/live_extensions_sync_test_base.cc index ff48581..c79e927 100644 --- a/chrome/test/live_sync/live_extensions_sync_test_base.cc +++ b/chrome/test/live_sync/live_extensions_sync_test_base.cc @@ -12,7 +12,7 @@ #include "base/ref_counted.h" #include "base/string_number_conversions.h" #include "base/values.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" @@ -103,7 +103,7 @@ void LiveExtensionsSyncTestBase::InstallExtension( Profile* profile, scoped_refptr<Extension> extension) { CHECK(profile); CHECK(extension.get()); - profile->GetExtensionsService()->OnExtensionInstalled(extension); + profile->GetExtensionService()->OnExtensionInstalled(extension); } void LiveExtensionsSyncTestBase::InstallAllPendingExtensions( @@ -115,7 +115,7 @@ void LiveExtensionsSyncTestBase::InstallAllPendingExtensions( // We make a copy here since InstallExtension() removes the // extension from the extensions service's copy. PendingExtensionMap pending_extensions = - profile->GetExtensionsService()->pending_extensions(); + profile->GetExtensionService()->pending_extensions(); for (PendingExtensionMap::const_iterator it = pending_extensions.begin(); it != pending_extensions.end(); ++it) { ExtensionIdMap::const_iterator it2 = extensions_by_id_.find(it->first); diff --git a/chrome/test/live_sync/live_themes_sync_test.cc b/chrome/test/live_sync/live_themes_sync_test.cc index cca60c4..de7d7c3 100644 --- a/chrome/test/live_sync/live_themes_sync_test.cc +++ b/chrome/test/live_sync/live_themes_sync_test.cc @@ -7,7 +7,7 @@ #include <string> #include "base/logging.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/browser_theme_provider.h" #include "chrome/common/extensions/extension.h" @@ -53,7 +53,7 @@ bool LiveThemesSyncTest::UsingNativeTheme(Profile* profile) { bool LiveThemesSyncTest::ExtensionIsPendingInstall( Profile* profile, const Extension* extension) { const PendingExtensionMap& pending_extensions = - profile->GetExtensionsService()->pending_extensions(); + profile->GetExtensionService()->pending_extensions(); return pending_extensions.find(extension->id()) != pending_extensions.end(); } diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc index 5266771..3c37562 100644 --- a/chrome/test/testing_profile.cc +++ b/chrome/test/testing_profile.cc @@ -18,7 +18,7 @@ #include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/browser/dom_ui/ntp_resource_cache.h" #include "chrome/browser/extensions/extension_pref_store.h" -#include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/favicon_service.h" #include "chrome/browser/geolocation/geolocation_content_settings_map.h" #include "chrome/browser/geolocation/geolocation_permission_context.h" @@ -326,14 +326,14 @@ void TestingProfile::UseThemeProvider(BrowserThemeProvider* theme_provider) { theme_provider_.reset(theme_provider); } -scoped_refptr<ExtensionsService> TestingProfile::CreateExtensionsService( +scoped_refptr<ExtensionService> TestingProfile::CreateExtensionService( const CommandLine* command_line, const FilePath& install_directory) { extension_pref_store_.reset(new ExtensionPrefStore); extension_prefs_.reset(new ExtensionPrefs(GetPrefs(), install_directory, extension_pref_store_.get())); - extensions_service_ = new ExtensionsService(this, + extensions_service_ = new ExtensionService(this, command_line, install_directory, extension_prefs_.get(), @@ -359,7 +359,7 @@ webkit_database::DatabaseTracker* TestingProfile::GetDatabaseTracker() { return db_tracker_; } -ExtensionsService* TestingProfile::GetExtensionsService() { +ExtensionService* TestingProfile::GetExtensionService() { return extensions_service_.get(); } diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h index 53a1fb6..847093e 100644 --- a/chrome/test/testing_profile.h +++ b/chrome/test/testing_profile.h @@ -111,11 +111,11 @@ class TestingProfile : public Profile { // ownership of |theme_provider|. void UseThemeProvider(BrowserThemeProvider* theme_provider); - // Creates an ExtensionsService initialized with the testing profile and + // Creates an ExtensionService initialized with the testing profile and // returns it. The profile keeps its own copy of a scoped_refptr to the - // ExtensionsService to make sure that is still alive to be notified when the + // ExtensionService to make sure that is still alive to be notified when the // profile is destroyed. - scoped_refptr<ExtensionsService> CreateExtensionsService( + scoped_refptr<ExtensionService> CreateExtensionService( const CommandLine* command_line, const FilePath& install_directory); @@ -142,7 +142,7 @@ class TestingProfile : public Profile { virtual ChromeAppCacheService* GetAppCacheService() { return NULL; } virtual webkit_database::DatabaseTracker* GetDatabaseTracker(); virtual VisitedLinkMaster* GetVisitedLinkMaster() { return NULL; } - virtual ExtensionsService* GetExtensionsService(); + virtual ExtensionService* GetExtensionService(); virtual UserScriptMaster* GetUserScriptMaster() { return NULL; } virtual ExtensionDevToolsManager* GetExtensionDevToolsManager() { return NULL; @@ -412,13 +412,13 @@ class TestingProfile : public Profile { // Extension pref store, created for use by |extension_prefs_|. scoped_ptr<ExtensionPrefStore> extension_pref_store_; - // The Extension Preferences. Only created if CreateExtensionsService is + // The Extension Preferences. Only created if CreateExtensionService is // invoked. scoped_ptr<ExtensionPrefs> extension_prefs_; - // For properly notifying the ExtensionsService when the profile + // For properly notifying the ExtensionService when the profile // is disposed. - scoped_refptr<ExtensionsService> extensions_service_; + scoped_refptr<ExtensionService> extensions_service_; // The proxy prefs tracker. scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; diff --git a/tools/heapcheck/suppressions.txt b/tools/heapcheck/suppressions.txt index 5b0bb6f..db9bc55 100644 --- a/tools/heapcheck/suppressions.txt +++ b/tools/heapcheck/suppressions.txt @@ -861,13 +861,13 @@ fun:PurgePluginListCache fun:PluginService::Observe fun:NotificationService::Notify - fun:ExtensionsService::NotifyExtensionLoaded - fun:ExtensionsService::OnExtensionLoaded - fun:ExtensionsService::LoadInstalledExtension - fun:ExtensionsService::ContinueLoadAllExtensions - fun:ExtensionsService::LoadAllExtensions - fun:ExtensionsService::Init - fun:ExtensionsServiceTest_CleanupOnStartup_Test::TestBody + fun:ExtensionService::NotifyExtensionLoaded + fun:ExtensionService::OnExtensionLoaded + fun:ExtensionService::LoadInstalledExtension + fun:ExtensionService::ContinueLoadAllExtensions + fun:ExtensionService::LoadAllExtensions + fun:ExtensionService::Init + fun:ExtensionServiceTest_CleanupOnStartup_Test::TestBody } { bug_53184 diff --git a/tools/valgrind/wine_memcheck/suppressions.txt b/tools/valgrind/wine_memcheck/suppressions.txt index 64161d9..a8f21f8 100644 --- a/tools/valgrind/wine_memcheck/suppressions.txt +++ b/tools/valgrind/wine_memcheck/suppressions.txt @@ -502,8 +502,8 @@ Memcheck:Leak ... fun:operator new - fun:NewRunnableMethod<ExtensionsServiceBackend,void (__thiscall ExtensionsServiceBackend::*)(void)> - fun:ExtensionsService::ClearProvidersForTesting + fun:NewRunnableMethod<ExtensionServiceBackend,void (__thiscall ExtensionServiceBackend::*)(void)> + fun:ExtensionService::ClearProvidersForTesting } { bug_33424 diff --git a/tools/wine_valgrind/chromium-valgrind-suppressions b/tools/wine_valgrind/chromium-valgrind-suppressions index 3dd72f1..827aeb5 100644 --- a/tools/wine_valgrind/chromium-valgrind-suppressions +++ b/tools/wine_valgrind/chromium-valgrind-suppressions @@ -305,8 +305,8 @@ Memcheck:Leak ... fun:operator new - fun:NewRunnableMethod<ExtensionsServiceBackend,void (__thiscall ExtensionsServiceBackend::*)(void)> - fun:ExtensionsService::ClearProvidersForTesting + fun:NewRunnableMethod<ExtensionServiceBackend,void (__thiscall ExtensionServiceBackend::*)(void)> + fun:ExtensionService::ClearProvidersForTesting } { bug_33424 |