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

Side by Side Diff: chrome/browser/extensions/settings/settings_test_util.cc

Issue 8497065: Extension Settings API: make it so that when leveldb storage areas fail to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/extensions/settings/settings_test_util.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/settings/settings_test_util.h" 5 #include "chrome/browser/extensions/settings/settings_test_util.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "chrome/common/extensions/extension.h" 8 #include "chrome/common/extensions/extension.h"
9 #include "chrome/browser/extensions/settings/settings_frontend.h"
9 10
10 namespace extensions { 11 namespace extensions {
11 12
12 namespace settings_test_util { 13 namespace settings_test_util {
13 14
14 // Intended as a StorageCallback from GetStorage. 15 // Intended as a StorageCallback from GetStorage.
15 static void AssignStorage( 16 static void AssignStorage(SettingsStorage** dst, SettingsStorage* src) {
16 SettingsStorage** dst, SettingsStorage* src) {
17 *dst = src; 17 *dst = src;
18 } 18 }
19 19
20 SettingsStorage* GetStorage( 20 SettingsStorage* GetStorage(
21 const std::string& extension_id, SettingsFrontend* frontend) { 21 const std::string& extension_id, SettingsFrontend* frontend) {
22 SettingsStorage* storage = NULL; 22 SettingsStorage* storage = NULL;
23 frontend->RunWithStorage( 23 frontend->RunWithStorage(
24 extension_id, 24 extension_id,
25 base::Bind(&AssignStorage, &storage)); 25 base::Bind(&AssignStorage, &storage));
26 MessageLoop::current()->RunAllPending(); 26 MessageLoop::current()->RunAllPending();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 return static_cast<ExtensionService*>(as_interface); 90 return static_cast<ExtensionService*>(as_interface);
91 } 91 }
92 92
93 ExtensionEventRouter* MockProfile::GetExtensionEventRouter() { 93 ExtensionEventRouter* MockProfile::GetExtensionEventRouter() {
94 return event_router_.get(); 94 return event_router_.get();
95 } 95 }
96 96
97 } // namespace settings_test_util 97 } // namespace settings_test_util
98 98
99 } // namespace extensions 99 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/settings/settings_test_util.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698