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