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

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

Issue 11359081: Lazy initialization for ProcessesEventRouter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extension_system_factory.h" 9 #include "chrome/browser/extensions/extension_system_factory.h"
10 #include "chrome/browser/extensions/settings/settings_frontend.h" 10 #include "chrome/browser/extensions/settings/settings_frontend.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 // MockExtensionSystem 109 // MockExtensionSystem
110 110
111 MockExtensionSystem::MockExtensionSystem(Profile* profile) 111 MockExtensionSystem::MockExtensionSystem(Profile* profile)
112 : TestExtensionSystem(profile) {} 112 : TestExtensionSystem(profile) {}
113 MockExtensionSystem::~MockExtensionSystem() {} 113 MockExtensionSystem::~MockExtensionSystem() {}
114 114
115 EventRouter* MockExtensionSystem::event_router() { 115 EventRouter* MockExtensionSystem::event_router() {
116 if (!event_router_.get()) 116 if (!event_router_.get())
117 event_router_.reset(new EventRouter(profile_, NULL)); 117 event_router_.reset(new EventRouter(profile_));
118 return event_router_.get(); 118 return event_router_.get();
119 } 119 }
120 120
121 ProfileKeyedService* BuildMockExtensionSystem(Profile* profile) { 121 ProfileKeyedService* BuildMockExtensionSystem(Profile* profile) {
122 return new MockExtensionSystem(profile); 122 return new MockExtensionSystem(profile);
123 } 123 }
124 124
125 // MockProfile 125 // MockProfile
126 126
127 MockProfile::MockProfile(const FilePath& file_path) 127 MockProfile::MockProfile(const FilePath& file_path)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 ValueStore* ScopedSettingsStorageFactory::Create( 160 ValueStore* ScopedSettingsStorageFactory::Create(
161 const FilePath& base_path, const std::string& extension_id) { 161 const FilePath& base_path, const std::string& extension_id) {
162 DCHECK(delegate_.get()); 162 DCHECK(delegate_.get());
163 return delegate_->Create(base_path, extension_id); 163 return delegate_->Create(base_path, extension_id);
164 } 164 }
165 165
166 } // namespace settings_test_util 166 } // namespace settings_test_util
167 167
168 } // namespace extensions 168 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698