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

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

Issue 11689004: Move PromoResourceService from Profile to BrowserProcessImpl/local_state(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang Created 7 years, 11 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) 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 // 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_BASE_TESTING_BROWSER_PROCESS_H_ 10 #ifndef CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_
(...skipping 25 matching lines...) Expand all
36 36
37 namespace prerender { 37 namespace prerender {
38 class PrerenderTracker; 38 class PrerenderTracker;
39 } 39 }
40 40
41 class TestingBrowserProcess : public BrowserProcess { 41 class TestingBrowserProcess : public BrowserProcess {
42 public: 42 public:
43 TestingBrowserProcess(); 43 TestingBrowserProcess();
44 virtual ~TestingBrowserProcess(); 44 virtual ~TestingBrowserProcess();
45 45
46 // Convenience method to get g_browser_process as a TestingBrowserProcess*.
47 static TestingBrowserProcess* GetGlobal();
48
46 virtual void ResourceDispatcherHostCreated() OVERRIDE; 49 virtual void ResourceDispatcherHostCreated() OVERRIDE;
47 virtual void EndSession() OVERRIDE; 50 virtual void EndSession() OVERRIDE;
48 virtual MetricsService* metrics_service() OVERRIDE; 51 virtual MetricsService* metrics_service() OVERRIDE;
49 virtual IOThread* io_thread() OVERRIDE; 52 virtual IOThread* io_thread() OVERRIDE;
50 virtual WatchDogThread* watchdog_thread() OVERRIDE; 53 virtual WatchDogThread* watchdog_thread() OVERRIDE;
51 virtual ProfileManager* profile_manager() OVERRIDE; 54 virtual ProfileManager* profile_manager() OVERRIDE;
52 virtual PrefServiceSimple* local_state() OVERRIDE; 55 virtual PrefServiceSimple* local_state() OVERRIDE;
53 virtual chrome_variations::VariationsService* variations_service() OVERRIDE; 56 virtual chrome_variations::VariationsService* variations_service() OVERRIDE;
54 virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE; 57 virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE;
55 virtual policy::PolicyService* policy_service() OVERRIDE; 58 virtual policy::PolicyService* policy_service() OVERRIDE;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 143
141 // The following objects are not owned by TestingBrowserProcess: 144 // The following objects are not owned by TestingBrowserProcess:
142 PrefServiceSimple* local_state_; 145 PrefServiceSimple* local_state_;
143 IOThread* io_thread_; 146 IOThread* io_thread_;
144 net::URLRequestContextGetter* system_request_context_; 147 net::URLRequestContextGetter* system_request_context_;
145 148
146 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); 149 DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
147 }; 150 };
148 151
149 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ 152 #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698