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

Unified Diff: chrome/browser/extensions/api/runtime/runtime_api.cc

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/runtime/runtime_api.cc
diff --git a/chrome/browser/extensions/api/runtime/runtime_api.cc b/chrome/browser/extensions/api/runtime/runtime_api.cc
index 11631ca47a7ef0236619c2a5882ee64adcd2a98a..376cdb71413679cc03b6eacc2e5573b9c492f4d1 100644
--- a/chrome/browser/extensions/api/runtime/runtime_api.cc
+++ b/chrome/browser/extensions/api/runtime/runtime_api.cc
@@ -13,7 +13,6 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -28,6 +27,7 @@
#include "content/public/browser/render_view_host.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_registry.h"
+#include "extensions/browser/extension_system.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/lazy_background_task_queue.h"
#include "extensions/browser/process_manager.h"
@@ -91,7 +91,7 @@ void DispatchOnStartupEventImpl(BrowserContext* browser_context,
!ExtensionsBrowserClient::Get()->IsValidContext(browser_context))
return;
ExtensionSystem* system =
- ExtensionSystem::GetForBrowserContext(browser_context);
+ ExtensionSystem::Get(browser_context);
if (!system)
return;
@@ -160,7 +160,7 @@ RuntimeAPI::RuntimeAPI(content::BrowserContext* context)
RuntimeAPI::~RuntimeAPI() {
if (registered_for_updates_) {
- ExtensionSystem::GetForBrowserContext(browser_context_)->
+ ExtensionSystem::Get(browser_context_)->
extension_service()->RemoveUpdateObserver(this);
}
}
@@ -203,7 +203,7 @@ void RuntimeAPI::OnExtensionsReady() {
registered_for_updates_ = true;
- ExtensionSystem::GetForBrowserContext(browser_context_)->extension_service()->
+ ExtensionSystem::Get(browser_context_)->extension_service()->
AddUpdateObserver(this);
}
@@ -228,7 +228,7 @@ void RuntimeAPI::OnExtensionInstalled(const Extension* extension) {
return;
// Get the previous version to check if this is an upgrade.
- ExtensionService* service = ExtensionSystem::GetForBrowserContext(
+ ExtensionService* service = ExtensionSystem::Get(
browser_context_)->extension_service();
const Extension* old = service->GetExtensionById(extension->id(), true);
Version old_version;
@@ -283,7 +283,7 @@ void RuntimeEventRouter::DispatchOnInstalledEvent(
bool chrome_updated) {
if (!ExtensionsBrowserClient::Get()->IsValidContext(context))
return;
- ExtensionSystem* system = ExtensionSystem::GetForBrowserContext(context);
+ ExtensionSystem* system = ExtensionSystem::Get(context);
if (!system)
return;

Powered by Google App Engine
This is Rietveld 408576698