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

Side by Side Diff: extensions/browser/api/storage/storage_frontend.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/storage/storage_frontend.h" 5 #include "extensions/browser/api/storage/storage_frontend.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 30 matching lines...) Expand all
41 void OnSettingsChanged(const std::string& extension_id, 41 void OnSettingsChanged(const std::string& extension_id,
42 settings_namespace::Namespace settings_namespace, 42 settings_namespace::Namespace settings_namespace,
43 const std::string& change_json) override { 43 const std::string& change_json) override {
44 // TODO(gdk): This is a temporary hack while the refactoring for 44 // TODO(gdk): This is a temporary hack while the refactoring for
45 // string-based event payloads is removed. http://crbug.com/136045 45 // string-based event payloads is removed. http://crbug.com/136045
46 scoped_ptr<base::ListValue> args(new base::ListValue()); 46 scoped_ptr<base::ListValue> args(new base::ListValue());
47 args->Append(base::JSONReader::Read(change_json)); 47 args->Append(base::JSONReader::Read(change_json));
48 args->Append(new base::StringValue(settings_namespace::ToString( 48 args->Append(new base::StringValue(settings_namespace::ToString(
49 settings_namespace))); 49 settings_namespace)));
50 scoped_ptr<Event> event(new Event(events::STORAGE_ON_CHANGED, 50 scoped_ptr<Event> event(new Event(events::STORAGE_ON_CHANGED,
51 core_api::storage::OnChanged::kEventName, 51 api::storage::OnChanged::kEventName,
52 args.Pass())); 52 args.Pass()));
53 EventRouter::Get(browser_context_) 53 EventRouter::Get(browser_context_)
54 ->DispatchEventToExtension(extension_id, event.Pass()); 54 ->DispatchEventToExtension(extension_id, event.Pass());
55 } 55 }
56 56
57 private: 57 private:
58 BrowserContext* const browser_context_; 58 BrowserContext* const browser_context_;
59 }; 59 };
60 60
61 } // namespace 61 } // namespace
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // static 177 // static
178 BrowserContextKeyedAPIFactory<StorageFrontend>* 178 BrowserContextKeyedAPIFactory<StorageFrontend>*
179 StorageFrontend::GetFactoryInstance() { 179 StorageFrontend::GetFactoryInstance() {
180 return g_factory.Pointer(); 180 return g_factory.Pointer();
181 } 181 }
182 182
183 // static 183 // static
184 const char* StorageFrontend::service_name() { return "StorageFrontend"; } 184 const char* StorageFrontend::service_name() { return "StorageFrontend"; }
185 185
186 } // namespace extensions 186 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/storage/storage_api.cc ('k') | extensions/browser/api/system_cpu/cpu_info_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698