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

Unified Diff: extensions/browser/api/extensions_api_client.cc

Issue 180213008: Add ExtensionsApiClient interface, use it in the storage API SettingsFrontend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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: extensions/browser/api/extensions_api_client.cc
diff --git a/extensions/browser/api/extensions_api_client.cc b/extensions/browser/api/extensions_api_client.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bf1ba5a5f460a290c6a35484e47801ac04cc5e6f
--- /dev/null
+++ b/extensions/browser/api/extensions_api_client.cc
@@ -0,0 +1,32 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "extensions/browser/api/extensions_api_client.h"
+
+namespace extensions {
+namespace {
+
+ExtensionsApiClient* g_client = NULL;
+
+} // namespace
+
+ExtensionsApiClient::ExtensionsApiClient() {}
+
+ExtensionsApiClient::~ExtensionsApiClient() {}
+
+void ExtensionsApiClient::AddAdditionalValueStoreCaches(
+ content::BrowserContext* context,
+ scoped_refptr<SettingsStorageFactory> factory,
+ scoped_refptr<ObserverListThreadSafe<SettingsObserver> > observers,
+ std::map<settings_namespace::Namespace, ValueStoreCache*>* caches) {}
+
+// static
+ExtensionsApiClient* ExtensionsApiClient::Get() { return g_client; }
+
+// static
+void ExtensionsApiClient::Set(ExtensionsApiClient* client) {
+ g_client = client;
Devlin 2014/03/03 17:07:59 Should we ever be able to quietly reset a client?
James Cook 2014/03/03 19:53:09 We used to have DCHECK(!g_client) in the other ext
Devlin 2014/03/03 20:25:27 Ah, okay.
+}
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698