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

Side by Side Diff: chrome/test/testing_browser_process.h

Issue 6542013: Get rid of browser_prefs::RegisterAllPrefs() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix metrics_log_unittest.cc Created 9 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 unified diff | Download patch | Annotate | Revision Log
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 // An implementation of BrowserProcess for unit tests that fails for most 5 // An implementation of BrowserProcess for unit tests that fails for most
6 // services. By preventing creation of services, we reduce dependencies and 6 // services. By preventing creation of services, we reduce dependencies and
7 // keep the profile clean. Clients of this class must handle the NULL return 7 // keep the profile clean. Clients of this class must handle the NULL return
8 // value, however. 8 // value, however.
9 9
10 #ifndef CHROME_TEST_TESTING_BROWSER_PROCESS_H_ 10 #ifndef CHROME_TEST_TESTING_BROWSER_PROCESS_H_
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); 145 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
146 }; 146 };
147 147
148 // Scoper to put a TestingBrowserProcess in |g_browser_process|. 148 // Scoper to put a TestingBrowserProcess in |g_browser_process|.
149 class ScopedTestingBrowserProcess { 149 class ScopedTestingBrowserProcess {
150 public: 150 public:
151 ScopedTestingBrowserProcess(); 151 ScopedTestingBrowserProcess();
152 ~ScopedTestingBrowserProcess(); 152 ~ScopedTestingBrowserProcess();
153 153
154 TestingBrowserProcess* get() {
Paweł Hajdan Jr. 2011/02/18 17:03:43 That seems wrong, I think the code should just use
Mattias Nissler (ping if slow) 2011/02/18 17:08:04 See my other comment for why this is here. Would y
155 return browser_process_.get();
156 }
157
154 private: 158 private:
155 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062. 159 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
156 // After the transition is over, we should just stack-allocate it. 160 // After the transition is over, we should just stack-allocate it.
157 scoped_ptr<TestingBrowserProcess> browser_process_; 161 scoped_ptr<TestingBrowserProcess> browser_process_;
158 162
159 DISALLOW_COPY_AND_ASSIGN(ScopedTestingBrowserProcess); 163 DISALLOW_COPY_AND_ASSIGN(ScopedTestingBrowserProcess);
160 }; 164 };
161 165
162 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ 166 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698