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

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

Issue 6478005: GTTF: Use a fresh TestingBrowserProcess for each test, part #1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make more tests use the new base class 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/testing_browser_process.cc » ('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 // 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 PrefService* pref_service_; 136 PrefService* pref_service_;
137 bool created_configuration_policy_provider_keeper_; 137 bool created_configuration_policy_provider_keeper_;
138 scoped_ptr<policy::ConfigurationPolicyProviderKeeper> 138 scoped_ptr<policy::ConfigurationPolicyProviderKeeper>
139 configuration_policy_provider_keeper_; 139 configuration_policy_provider_keeper_;
140 scoped_ptr<GoogleURLTracker> google_url_tracker_; 140 scoped_ptr<GoogleURLTracker> google_url_tracker_;
141 141
142 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); 142 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
143 }; 143 };
144 144
145 // Scoper to put a TestingBrowserProcess in |g_browser_process|.
146 class ScopedTestingBrowserProcess {
147 public:
148 ScopedTestingBrowserProcess();
149 ~ScopedTestingBrowserProcess();
150
151 private:
152 // TODO(phajdan.jr): Temporary, for http://crbug.com/61062.
153 // After the transition is over, we should just stack-allocate it.
154 scoped_ptr<TestingBrowserProcess> browser_process_;
155
156 DISALLOW_COPY_AND_ASSIGN(ScopedTestingBrowserProcess);
157 };
158
145 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_ 159 #endif // CHROME_TEST_TESTING_BROWSER_PROCESS_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/test/testing_browser_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698