| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |