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

Side by Side Diff: chrome/test/base/chrome_test_suite.cc

Issue 24544004: Remove the chrome namespace around ChromeContent[Renderer]Client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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
« no previous file with comments | « chrome/test/base/chrome_render_view_test.h ('k') | chrome/test/base/in_process_browser_test.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) 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/test/base/chrome_test_suite.h" 5 #include "chrome/test/base/chrome_test_suite.h"
6 6
7 #if defined(OS_CHROMEOS) 7 #if defined(OS_CHROMEOS)
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 #endif 10 #endif
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 if (g_browser_process) { 104 if (g_browser_process) {
105 BrowserProcess* browser_process = g_browser_process; 105 BrowserProcess* browser_process = g_browser_process;
106 // g_browser_process must be NULL during its own destruction. 106 // g_browser_process must be NULL during its own destruction.
107 g_browser_process = NULL; 107 g_browser_process = NULL;
108 delete browser_process; 108 delete browser_process;
109 } 109 }
110 } 110 }
111 111
112 private: 112 private:
113 void SetUpContentClients() { 113 void SetUpContentClients() {
114 content_client_.reset(new chrome::ChromeContentClient); 114 content_client_.reset(new ChromeContentClient);
115 content::SetContentClient(content_client_.get()); 115 content::SetContentClient(content_client_.get());
116 // TODO(ios): Bring this back once ChromeContentBrowserClient is building. 116 // TODO(ios): Bring this back once ChromeContentBrowserClient is building.
117 #if !defined(OS_IOS) 117 #if !defined(OS_IOS)
118 browser_content_client_.reset(new chrome::ChromeContentBrowserClient()); 118 browser_content_client_.reset(new chrome::ChromeContentBrowserClient());
119 content::SetBrowserClientForTesting(browser_content_client_.get()); 119 content::SetBrowserClientForTesting(browser_content_client_.get());
120 utility_content_client_.reset(new chrome::ChromeContentUtilityClient()); 120 utility_content_client_.reset(new chrome::ChromeContentUtilityClient());
121 content::SetUtilityClientForTesting(utility_content_client_.get()); 121 content::SetUtilityClientForTesting(utility_content_client_.get());
122 #endif 122 #endif
123 } 123 }
124 124
(...skipping 12 matching lines...) Expand all
137 new extensions::ChromeExtensionsBrowserClient); 137 new extensions::ChromeExtensionsBrowserClient);
138 extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get()); 138 extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get());
139 } 139 }
140 140
141 void TearDownExtensionsClients() { 141 void TearDownExtensionsClients() {
142 extensions_browser_client_.reset(); 142 extensions_browser_client_.reset();
143 extensions::ExtensionsBrowserClient::Set(NULL); 143 extensions::ExtensionsBrowserClient::Set(NULL);
144 } 144 }
145 145
146 // Client implementations for the content module. 146 // Client implementations for the content module.
147 scoped_ptr<chrome::ChromeContentClient> content_client_; 147 scoped_ptr<ChromeContentClient> content_client_;
148 // TODO(ios): Bring this back once ChromeContentBrowserClient is building. 148 // TODO(ios): Bring this back once ChromeContentBrowserClient is building.
149 #if !defined(OS_IOS) 149 #if !defined(OS_IOS)
150 scoped_ptr<chrome::ChromeContentBrowserClient> browser_content_client_; 150 scoped_ptr<chrome::ChromeContentBrowserClient> browser_content_client_;
151 scoped_ptr<chrome::ChromeContentUtilityClient> utility_content_client_; 151 scoped_ptr<chrome::ChromeContentUtilityClient> utility_content_client_;
152 #endif 152 #endif
153 153
154 // Client implementations for the extensions module. 154 // Client implementations for the extensions module.
155 scoped_ptr<extensions::ChromeExtensionsBrowserClient> 155 scoped_ptr<extensions::ChromeExtensionsBrowserClient>
156 extensions_browser_client_; 156 extensions_browser_client_;
157 157
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 RemoveSharedMemoryFile(stats_filename_); 246 RemoveSharedMemoryFile(stats_filename_);
247 stats_table_.reset(new base::StatsTable(stats_filename_, 20, 200)); 247 stats_table_.reset(new base::StatsTable(stats_filename_, 20, 200));
248 base::StatsTable::set_current(stats_table_.get()); 248 base::StatsTable::set_current(stats_table_.get());
249 249
250 testing::TestEventListeners& listeners = 250 testing::TestEventListeners& listeners =
251 testing::UnitTest::GetInstance()->listeners(); 251 testing::UnitTest::GetInstance()->listeners();
252 listeners.Append(new ChromeTestSuiteInitializer); 252 listeners.Append(new ChromeTestSuiteInitializer);
253 } 253 }
254 254
255 content::ContentClient* ChromeTestSuite::CreateClientForInitialization() { 255 content::ContentClient* ChromeTestSuite::CreateClientForInitialization() {
256 return new chrome::ChromeContentClient(); 256 return new ChromeContentClient();
257 } 257 }
258 258
259 void ChromeTestSuite::Shutdown() { 259 void ChromeTestSuite::Shutdown() {
260 ResourceBundle::CleanupSharedInstance(); 260 ResourceBundle::CleanupSharedInstance();
261 261
262 #if defined(OS_MACOSX) && !defined(OS_IOS) 262 #if defined(OS_MACOSX) && !defined(OS_IOS)
263 base::mac::SetOverrideFrameworkBundle(NULL); 263 base::mac::SetOverrideFrameworkBundle(NULL);
264 #endif 264 #endif
265 265
266 base::StatsTable::set_current(NULL); 266 base::StatsTable::set_current(NULL);
267 stats_table_.reset(); 267 stats_table_.reset();
268 RemoveSharedMemoryFile(stats_filename_); 268 RemoveSharedMemoryFile(stats_filename_);
269 269
270 base::TestSuite::Shutdown(); 270 base::TestSuite::Shutdown();
271 } 271 }
OLDNEW
« no previous file with comments | « chrome/test/base/chrome_render_view_test.h ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698