Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 89253002: Remove ExtensionPrefFactory's dependency on Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 update_once_all_providers_are_ready_(false), 330 update_once_all_providers_are_ready_(false),
331 browser_terminating_(false), 331 browser_terminating_(false),
332 installs_delayed_for_gc_(false), 332 installs_delayed_for_gc_(false),
333 is_first_run_(false) { 333 is_first_run_(false) {
334 #if defined(OS_CHROMEOS) 334 #if defined(OS_CHROMEOS)
335 disable_garbage_collection_ = false; 335 disable_garbage_collection_ = false;
336 #endif 336 #endif
337 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 337 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
338 338
339 // Figure out if extension installation should be enabled. 339 // Figure out if extension installation should be enabled.
340 if (command_line->HasSwitch(switches::kDisableExtensions) || 340 if (extensions::ExtensionsBrowserClient::Get()->AreExtensionsDisabled(
341 profile->GetPrefs()->GetBoolean(prefs::kDisableExtensions)) { 341 *command_line, profile))
342 extensions_enabled_ = false; 342 extensions_enabled_ = false;
343 }
344 343
345 registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING, 344 registrar_.Add(this, chrome::NOTIFICATION_APP_TERMINATING,
346 content::NotificationService::AllBrowserContextsAndSources()); 345 content::NotificationService::AllBrowserContextsAndSources());
347 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 346 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
348 content::NotificationService::AllBrowserContextsAndSources()); 347 content::NotificationService::AllBrowserContextsAndSources());
349 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED, 348 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED,
350 content::NotificationService::AllBrowserContextsAndSources()); 349 content::NotificationService::AllBrowserContextsAndSources());
351 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, 350 registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
352 content::NotificationService::AllBrowserContextsAndSources()); 351 content::NotificationService::AllBrowserContextsAndSources());
353 registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED, 352 registrar_.Add(this, chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
(...skipping 2437 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 } 2790 }
2792 2791
2793 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { 2792 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) {
2794 update_observers_.AddObserver(observer); 2793 update_observers_.AddObserver(observer);
2795 } 2794 }
2796 2795
2797 void ExtensionService::RemoveUpdateObserver( 2796 void ExtensionService::RemoveUpdateObserver(
2798 extensions::UpdateObserver* observer) { 2797 extensions::UpdateObserver* observer) {
2799 update_observers_.RemoveObserver(observer); 2798 update_observers_.RemoveObserver(observer);
2800 } 2799 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs_factory.cc ('k') | chrome/browser/extensions/extension_sync_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698