| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "chrome/browser/extensions/extension_processes_api.h" | 48 #include "chrome/browser/extensions/extension_processes_api.h" |
| 49 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 49 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 50 #include "chrome/browser/extensions/extension_sync_data.h" | 50 #include "chrome/browser/extensions/extension_sync_data.h" |
| 51 #include "chrome/browser/extensions/extension_updater.h" | 51 #include "chrome/browser/extensions/extension_updater.h" |
| 52 #include "chrome/browser/extensions/extension_web_ui.h" | 52 #include "chrome/browser/extensions/extension_web_ui.h" |
| 53 #include "chrome/browser/extensions/extension_webnavigation_api.h" | 53 #include "chrome/browser/extensions/extension_webnavigation_api.h" |
| 54 #include "chrome/browser/extensions/external_extension_provider_impl.h" | 54 #include "chrome/browser/extensions/external_extension_provider_impl.h" |
| 55 #include "chrome/browser/extensions/external_extension_provider_interface.h" | 55 #include "chrome/browser/extensions/external_extension_provider_interface.h" |
| 56 #include "chrome/browser/extensions/installed_loader.h" | 56 #include "chrome/browser/extensions/installed_loader.h" |
| 57 #include "chrome/browser/extensions/pending_extension_manager.h" | 57 #include "chrome/browser/extensions/pending_extension_manager.h" |
| 58 #include "chrome/browser/extensions/settings/settings_frontend.h" |
| 58 #include "chrome/browser/extensions/unpacked_installer.h" | 59 #include "chrome/browser/extensions/unpacked_installer.h" |
| 59 #include "chrome/browser/history/history_extension_api.h" | 60 #include "chrome/browser/history/history_extension_api.h" |
| 60 #include "chrome/browser/net/chrome_url_request_context.h" | 61 #include "chrome/browser/net/chrome_url_request_context.h" |
| 61 #include "chrome/browser/prefs/pref_service.h" | 62 #include "chrome/browser/prefs/pref_service.h" |
| 62 #include "chrome/browser/profiles/profile.h" | 63 #include "chrome/browser/profiles/profile.h" |
| 63 #include "chrome/browser/search_engines/template_url_service.h" | 64 #include "chrome/browser/search_engines/template_url_service.h" |
| 64 #include "chrome/browser/search_engines/template_url_service_factory.h" | 65 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 65 #include "chrome/browser/sync/api/sync_change.h" | 66 #include "chrome/browser/sync/api/sync_change.h" |
| 66 #include "chrome/browser/themes/theme_service.h" | 67 #include "chrome/browser/themes/theme_service.h" |
| 67 #include "chrome/browser/themes/theme_service_factory.h" | 68 #include "chrome/browser/themes/theme_service_factory.h" |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 } | 356 } |
| 356 | 357 |
| 357 ExtensionService::ExtensionService(Profile* profile, | 358 ExtensionService::ExtensionService(Profile* profile, |
| 358 const CommandLine* command_line, | 359 const CommandLine* command_line, |
| 359 const FilePath& install_directory, | 360 const FilePath& install_directory, |
| 360 ExtensionPrefs* extension_prefs, | 361 ExtensionPrefs* extension_prefs, |
| 361 bool autoupdate_enabled, | 362 bool autoupdate_enabled, |
| 362 bool extensions_enabled) | 363 bool extensions_enabled) |
| 363 : profile_(profile), | 364 : profile_(profile), |
| 364 extension_prefs_(extension_prefs), | 365 extension_prefs_(extension_prefs), |
| 365 settings_frontend_(profile), | 366 settings_frontend_(extensions::SettingsFrontend::Create(profile)), |
| 366 pending_extension_manager_(*ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 367 pending_extension_manager_(*ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
| 367 install_directory_(install_directory), | 368 install_directory_(install_directory), |
| 368 extensions_enabled_(extensions_enabled), | 369 extensions_enabled_(extensions_enabled), |
| 369 show_extensions_prompts_(true), | 370 show_extensions_prompts_(true), |
| 370 ready_(false), | 371 ready_(false), |
| 371 toolbar_model_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 372 toolbar_model_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
| 372 menu_manager_(profile), | 373 menu_manager_(profile), |
| 373 app_notification_manager_(new AppNotificationManager(profile)), | 374 app_notification_manager_(new AppNotificationManager(profile)), |
| 374 permissions_manager_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 375 permissions_manager_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
| 375 apps_promo_(profile->GetPrefs()), | 376 apps_promo_(profile->GetPrefs()), |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 | 1117 |
| 1117 Profile* ExtensionService::profile() { | 1118 Profile* ExtensionService::profile() { |
| 1118 return profile_; | 1119 return profile_; |
| 1119 } | 1120 } |
| 1120 | 1121 |
| 1121 ExtensionPrefs* ExtensionService::extension_prefs() { | 1122 ExtensionPrefs* ExtensionService::extension_prefs() { |
| 1122 return extension_prefs_; | 1123 return extension_prefs_; |
| 1123 } | 1124 } |
| 1124 | 1125 |
| 1125 extensions::SettingsFrontend* ExtensionService::settings_frontend() { | 1126 extensions::SettingsFrontend* ExtensionService::settings_frontend() { |
| 1126 return &settings_frontend_; | 1127 return settings_frontend_.get(); |
| 1127 } | 1128 } |
| 1128 | 1129 |
| 1129 ExtensionContentSettingsStore* | 1130 ExtensionContentSettingsStore* |
| 1130 ExtensionService::GetExtensionContentSettingsStore() { | 1131 ExtensionService::GetExtensionContentSettingsStore() { |
| 1131 return extension_prefs()->content_settings_store(); | 1132 return extension_prefs()->content_settings_store(); |
| 1132 } | 1133 } |
| 1133 | 1134 |
| 1134 ExtensionUpdater* ExtensionService::updater() { | 1135 ExtensionUpdater* ExtensionService::updater() { |
| 1135 return updater_.get(); | 1136 return updater_.get(); |
| 1136 } | 1137 } |
| (...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2490 | 2491 |
| 2491 ExtensionService::NaClModuleInfoList::iterator | 2492 ExtensionService::NaClModuleInfoList::iterator |
| 2492 ExtensionService::FindNaClModule(const GURL& url) { | 2493 ExtensionService::FindNaClModule(const GURL& url) { |
| 2493 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2494 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2494 iter != nacl_module_list_.end(); ++iter) { | 2495 iter != nacl_module_list_.end(); ++iter) { |
| 2495 if (iter->url == url) | 2496 if (iter->url == url) |
| 2496 return iter; | 2497 return iter; |
| 2497 } | 2498 } |
| 2498 return nacl_module_list_.end(); | 2499 return nacl_module_list_.end(); |
| 2499 } | 2500 } |
| OLD | NEW |