diff options
Diffstat (limited to 'chrome/browser/extensions')
24 files changed, 38 insertions, 47 deletions
diff --git a/chrome/browser/extensions/api/audio/audio_service_chromeos.cc b/chrome/browser/extensions/api/audio/audio_service_chromeos.cc index 559540b..40aad49d 100644 --- a/chrome/browser/extensions/api/audio/audio_service_chromeos.cc +++ b/chrome/browser/extensions/api/audio/audio_service_chromeos.cc @@ -63,7 +63,7 @@ class AudioServiceImpl : public AudioService, AudioServiceImpl::AudioServiceImpl() : cras_audio_client_(NULL), - ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { + weak_ptr_factory_(this) { if (chromeos::DBusThreadManager::IsInitialized() && chromeos::DBusThreadManager::Get()) { cras_audio_client_ = diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc index 4002616..bd106c5 100644 --- a/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc +++ b/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc @@ -31,7 +31,7 @@ ExtensionBluetoothEventRouter::ExtensionBluetoothEventRouter(Profile* profile) adapter_(NULL), num_event_listeners_(0), next_socket_id_(1), - ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { + weak_ptr_factory_(this) { DCHECK(profile_); } diff --git a/chrome/browser/extensions/api/declarative/rules_registry_with_cache.cc b/chrome/browser/extensions/api/declarative/rules_registry_with_cache.cc index cbe5b49..a1e3a7c 100644 --- a/chrome/browser/extensions/api/declarative/rules_registry_with_cache.cc +++ b/chrome/browser/extensions/api/declarative/rules_registry_with_cache.cc @@ -79,8 +79,7 @@ RulesRegistryWithCache::RulesRegistryWithCache( scoped_ptr<RuleStorageOnUI>* ui_part) : RulesRegistry(owner_thread, event_name), ready_(false), - ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_((profile) ? this - : NULL)), + weak_ptr_factory_((profile) ? this : NULL), storage_on_ui_((profile ? (new RuleStorageOnUI(profile, GetDeclarativeRuleStorageKey( @@ -277,7 +276,7 @@ RulesRegistryWithCache::RuleStorageOnUI::RuleStorageOnUI( registry_(registry), rules_registry_thread_(rules_registry_thread), ready_state_(NOT_READY), - ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {} + weak_ptr_factory_(this) {} RulesRegistryWithCache::RuleStorageOnUI::~RuleStorageOnUI() {} diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc index 5ab2663..c7c73be 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc @@ -1201,7 +1201,7 @@ ExtensionDownloadsEventRouter::ExtensionDownloadsEventRouter( Profile* profile, DownloadManager* manager) : profile_(profile), - ALLOW_THIS_IN_INITIALIZER_LIST(notifier_(manager, this)) { + notifier_(manager, this) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(profile_); extensions::EventRouter* router = extensions::ExtensionSystem::Get(profile_)-> diff --git a/chrome/browser/extensions/api/media_galleries_private/gallery_watch_manager.cc b/chrome/browser/extensions/api/media_galleries_private/gallery_watch_manager.cc index 23f0e87..c2cbfe1 100644 --- a/chrome/browser/extensions/api/media_galleries_private/gallery_watch_manager.cc +++ b/chrome/browser/extensions/api/media_galleries_private/gallery_watch_manager.cc @@ -133,7 +133,7 @@ GalleryWatchManager::GalleryFilePathWatcher::GalleryFilePathWatcher( : event_router_(event_router), gallery_id_(gallery_id), on_destroyed_callback_(on_destroyed_callback), - weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { + weak_ptr_factory_(this) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); gallery_path_ = path; AddExtension(extension_id); diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc index 4269639..7fd4d96 100644 --- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc +++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc @@ -103,7 +103,7 @@ ManagedValueStoreCache::ManagedValueStoreCache( Profile* profile, const scoped_refptr<SettingsStorageFactory>& factory, const scoped_refptr<SettingsObserverList>& observers) - : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), + : weak_factory_(this), weak_this_on_ui_(weak_factory_.GetWeakPtr()), profile_(profile), event_router_(ExtensionSystem::Get(profile)->event_router()), diff --git a/chrome/browser/extensions/api/streams_private/streams_private_api.cc b/chrome/browser/extensions/api/streams_private/streams_private_api.cc index a6027ca..7e296b9 100644 --- a/chrome/browser/extensions/api/streams_private/streams_private_api.cc +++ b/chrome/browser/extensions/api/streams_private/streams_private_api.cc @@ -36,7 +36,7 @@ StreamsPrivateAPI* StreamsPrivateAPI::Get(Profile* profile) { StreamsPrivateAPI::StreamsPrivateAPI(Profile* profile) : profile_(profile), - weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { + weak_ptr_factory_(this) { (new MimeTypesHandlerParser)->Register(); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc b/chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc index 6851f3f..9cb1f67 100644 --- a/chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc +++ b/chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc @@ -57,8 +57,7 @@ ExtensionIndicatorIcon::ExtensionIndicatorIcon(const Extension* extension, status_tray_(status_tray), icon_(status_icon), profile_(profile), - ALLOW_THIS_IN_INITIALIZER_LIST( - icon_factory_(profile, extension, action, this)) { + icon_factory_(profile, extension, action, this) { icon_->AddObserver(this); OnIconUpdated(); } diff --git a/chrome/browser/extensions/api/top_sites/top_sites_api.cc b/chrome/browser/extensions/api/top_sites/top_sites_api.cc index 986d30d..84d31a3 100644 --- a/chrome/browser/extensions/api/top_sites/top_sites_api.cc +++ b/chrome/browser/extensions/api/top_sites/top_sites_api.cc @@ -13,7 +13,7 @@ namespace extensions { TopSitesGetFunction::TopSitesGetFunction() - : ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {} + : weak_ptr_factory_(this) {} TopSitesGetFunction::~TopSitesGetFunction() {} diff --git a/chrome/browser/extensions/event_router.cc b/chrome/browser/extensions/event_router.cc index 4876f77..ae8a3f9 100644 --- a/chrome/browser/extensions/event_router.cc +++ b/chrome/browser/extensions/event_router.cc @@ -168,7 +168,7 @@ void EventRouter::DispatchEvent(IPC::Sender* ipc_sender, EventRouter::EventRouter(Profile* profile, ExtensionPrefs* extension_prefs) : profile_(profile), - listeners_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), + listeners_(this), activity_log_(ActivityLog::GetInstance(profile)), dispatch_chrome_updated_event_(false) { registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, diff --git a/chrome/browser/extensions/extension_context_menu_model.cc b/chrome/browser/extensions/extension_context_menu_model.cc index 2cec18a..fb68b6f 100644 --- a/chrome/browser/extensions/extension_context_menu_model.cc +++ b/chrome/browser/extensions/extension_context_menu_model.cc @@ -31,11 +31,10 @@ using content::Referrer; using content::WebContents; using extensions::Extension; -ExtensionContextMenuModel::ExtensionContextMenuModel( - const Extension* extension, - Browser* browser, - PopupDelegate* delegate) - : ALLOW_THIS_IN_INITIALIZER_LIST(SimpleMenuModel(this)), +ExtensionContextMenuModel::ExtensionContextMenuModel(const Extension* extension, + Browser* browser, + PopupDelegate* delegate) + : SimpleMenuModel(this), extension_id_(extension->id()), browser_(browser), profile_(browser->profile()), @@ -49,10 +48,9 @@ ExtensionContextMenuModel::ExtensionContextMenuModel( } } -ExtensionContextMenuModel::ExtensionContextMenuModel( - const Extension* extension, - Browser* browser) - : ALLOW_THIS_IN_INITIALIZER_LIST(SimpleMenuModel(this)), +ExtensionContextMenuModel::ExtensionContextMenuModel(const Extension* extension, + Browser* browser) + : SimpleMenuModel(this), extension_id_(extension->id()), browser_(browser), profile_(browser->profile()), diff --git a/chrome/browser/extensions/extension_error_ui_default.cc b/chrome/browser/extensions/extension_error_ui_default.cc index f1daf53..a5b7067 100644 --- a/chrome/browser/extensions/extension_error_ui_default.cc +++ b/chrome/browser/extensions/extension_error_ui_default.cc @@ -15,8 +15,7 @@ ExtensionErrorUIDefault::ExtensionErrorUIDefault( ExtensionService* extension_service) : ExtensionErrorUI(extension_service), browser_(NULL), - ALLOW_THIS_IN_INITIALIZER_LIST(global_error_( - new ExtensionGlobalError(this))) { + global_error_(new ExtensionGlobalError(this)) { } ExtensionErrorUIDefault::~ExtensionErrorUIDefault() { diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc index 25f0086..24cd5cd 100644 --- a/chrome/browser/extensions/extension_host.cc +++ b/chrome/browser/extensions/extension_host.cc @@ -90,7 +90,7 @@ class ExtensionHost::ProcessCreationQueue { friend struct DefaultSingletonTraits<ProcessCreationQueue>; ProcessCreationQueue() : pending_create_(false), - ALLOW_THIS_IN_INITIALIZER_LIST(ptr_factory_(this)) { } + ptr_factory_(this) {} // Queue up a delayed task to process the next ExtensionHost in the queue. void PostTask() { @@ -136,8 +136,7 @@ ExtensionHost::ExtensionHost(const Extension* extension, did_stop_loading_(false), document_element_available_(false), initial_url_(url), - ALLOW_THIS_IN_INITIALIZER_LIST( - extension_function_dispatcher_(profile_, this)), + extension_function_dispatcher_(profile_, this), extension_host_type_(host_type), associated_web_contents_(NULL) { host_contents_.reset(WebContents::Create( diff --git a/chrome/browser/extensions/extension_icon_image.cc b/chrome/browser/extensions/extension_icon_image.cc index d051ee7..c686d22 100644 --- a/chrome/browser/extensions/extension_icon_image.cc +++ b/chrome/browser/extensions/extension_icon_image.cc @@ -144,7 +144,7 @@ IconImage::IconImage( default_icon, skia::ImageOperations::RESIZE_BEST, gfx::Size(resource_size_in_dip, resource_size_in_dip))), - ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { + weak_ptr_factory_(this) { gfx::Size resource_size(resource_size_in_dip, resource_size_in_dip); source_ = new Source(this, resource_size); image_skia_ = gfx::ImageSkia(source_, resource_size); diff --git a/chrome/browser/extensions/extension_icon_manager.cc b/chrome/browser/extensions/extension_icon_manager.cc index f55060b..66f42db 100644 --- a/chrome/browser/extensions/extension_icon_manager.cc +++ b/chrome/browser/extensions/extension_icon_manager.cc @@ -46,7 +46,7 @@ static SkBitmap ApplyPadding(const SkBitmap& source, ExtensionIconManager::ExtensionIconManager() : monochrome_(false), - ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { + weak_ptr_factory_(this) { } ExtensionIconManager::~ExtensionIconManager() { diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc index e1aada0..10664a0 100644 --- a/chrome/browser/extensions/extension_prefs.cc +++ b/chrome/browser/extensions/extension_prefs.cc @@ -2077,8 +2077,7 @@ ExtensionPrefs::ExtensionPrefs( : prefs_(prefs), install_directory_(root_dir), extension_pref_value_map_(extension_pref_value_map), - ALLOW_THIS_IN_INITIALIZER_LIST(extension_sorting_( - new ExtensionSorting(this, prefs))), + extension_sorting_(new ExtensionSorting(this, prefs)), content_settings_store_(new ContentSettingsStore()), time_provider_(time_provider.Pass()) { } diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc index 5088dac..c1a2573 100644 --- a/chrome/browser/extensions/extension_process_manager.cc +++ b/chrome/browser/extensions/extension_process_manager.cc @@ -136,7 +136,7 @@ ExtensionProcessManager* ExtensionProcessManager::Create(Profile* profile) { ExtensionProcessManager::ExtensionProcessManager(Profile* profile) : site_instance_(SiteInstance::Create(profile)), - weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), + weak_ptr_factory_(this), devtools_callback_(base::Bind( &ExtensionProcessManager::OnDevToolsStateChanged, base::Unretained(this))) { diff --git a/chrome/browser/extensions/extension_protocols.cc b/chrome/browser/extensions/extension_protocols.cc index a6ed685..d52e81f 100644 --- a/chrome/browser/extensions/extension_protocols.cc +++ b/chrome/browser/extensions/extension_protocols.cc @@ -86,7 +86,7 @@ class URLRequestResourceBundleJob : public net::URLRequestSimpleJob { : net::URLRequestSimpleJob(request, network_delegate), filename_(filename), resource_id_(resource_id), - weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { + weak_factory_(this) { response_info_.headers = BuildHttpHeaders(content_security_policy, send_cors_header); } @@ -215,7 +215,7 @@ class URLRequestExtensionJob : public net::URLRequestFileJob { // TODO(tc): Move all of these files into resources.pak so we don't break // when updating on Linux. resource_(extension_id, directory_path, relative_path), - weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { + weak_factory_(this) { response_info_.headers = BuildHttpHeaders(content_security_policy, send_cors_header); } diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index d70cadb..9359346 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -344,21 +344,21 @@ ExtensionService::ExtensionService(Profile* profile, extension_prefs_(extension_prefs), blacklist_(blacklist), settings_frontend_(extensions::SettingsFrontend::Create(profile)), - pending_extension_manager_(*ALLOW_THIS_IN_INITIALIZER_LIST(this)), + pending_extension_manager_(*this), install_directory_(install_directory), extensions_enabled_(extensions_enabled), show_extensions_prompts_(true), install_updates_when_idle_(true), ready_(false), - toolbar_model_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), + toolbar_model_(this), menu_manager_(profile), event_routers_initialized_(false), update_once_all_providers_are_ready_(false), browser_terminating_(false), installs_delayed_(false), is_first_run_(false), - app_sync_bundle_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), - extension_sync_bundle_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { + app_sync_bundle_(this), + extension_sync_bundle_(this) { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // Figure out if extension installation should be enabled. diff --git a/chrome/browser/extensions/image_loader.cc b/chrome/browser/extensions/image_loader.cc index a80565d..eb63302 100644 --- a/chrome/browser/extensions/image_loader.cc +++ b/chrome/browser/extensions/image_loader.cc @@ -147,7 +147,7 @@ ImageLoader::LoadResult::~LoadResult() { // ImageLoader ImageLoader::ImageLoader() - : ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { + : weak_ptr_factory_(this) { } ImageLoader::~ImageLoader() { diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc index 5fb4541..5c2b4cf 100644 --- a/chrome/browser/extensions/tab_helper.cc +++ b/chrome/browser/extensions/tab_helper.cc @@ -80,10 +80,8 @@ TabHelper::ScriptExecutionObserver::~ScriptExecutionObserver() { TabHelper::TabHelper(content::WebContents* web_contents) : content::WebContentsObserver(web_contents), extension_app_(NULL), - ALLOW_THIS_IN_INITIALIZER_LIST( - extension_function_dispatcher_( - Profile::FromBrowserContext(web_contents->GetBrowserContext()), - this)), + extension_function_dispatcher_( + Profile::FromBrowserContext(web_contents->GetBrowserContext()), this), pending_web_app_action_(NONE), script_executor_(new ScriptExecutor(web_contents, &script_execution_observers_)), @@ -91,7 +89,7 @@ TabHelper::TabHelper(content::WebContents* web_contents) ExtensionSystem::Get( Profile::FromBrowserContext(web_contents->GetBrowserContext()))-> rules_registry_service()), - ALLOW_THIS_IN_INITIALIZER_LIST(image_loader_ptr_factory_(this)) { + image_loader_ptr_factory_(this) { // The ActiveTabPermissionManager requires a session ID; ensure this // WebContents has one. SessionTabHelper::CreateForWebContents(web_contents); diff --git a/chrome/browser/extensions/updater/extension_downloader.cc b/chrome/browser/extensions/updater/extension_downloader.cc index f165732..addacd6 100644 --- a/chrome/browser/extensions/updater/extension_downloader.cc +++ b/chrome/browser/extensions/updater/extension_downloader.cc @@ -171,7 +171,7 @@ ExtensionDownloader::ExtensionDownloader( net::URLRequestContextGetter* request_context) : delegate_(delegate), request_context_(request_context), - weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), + weak_ptr_factory_(this), manifests_queue_(&kDefaultBackoffPolicy, base::Bind(&ExtensionDownloader::CreateManifestFetcher, base::Unretained(this))), diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc index 130da8f..a2fe7a6 100644 --- a/chrome/browser/extensions/updater/extension_updater.cc +++ b/chrome/browser/extensions/updater/extension_updater.cc @@ -133,7 +133,7 @@ ExtensionUpdater::ExtensionUpdater(ExtensionServiceInterface* service, Blacklist* blacklist, int frequency_seconds) : alive_(false), - weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), + weak_ptr_factory_(this), service_(service), frequency_seconds_(frequency_seconds), will_check_soon_(false), extension_prefs_(extension_prefs), prefs_(prefs), profile_(profile), blacklist_(blacklist), diff --git a/chrome/browser/extensions/updater/extension_updater_unittest.cc b/chrome/browser/extensions/updater/extension_updater_unittest.cc index abdd9db..91d86b0 100644 --- a/chrome/browser/extensions/updater/extension_updater_unittest.cc +++ b/chrome/browser/extensions/updater/extension_updater_unittest.cc @@ -211,7 +211,7 @@ class MockService : public TestExtensionService { public: explicit MockService(TestExtensionPrefs* prefs) : prefs_(prefs), - pending_extension_manager_(ALLOW_THIS_IN_INITIALIZER_LIST(*this)), + pending_extension_manager_(*this), blacklist_(prefs_->prefs()) { profile_.CreateRequestContext(); } |