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

Side by Side Diff: chrome_frame/test/net/fake_external_tab.cc

Issue 7467012: Modifying prefetch to account for multi-profile. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Modifying prefetch to account for multi-profile. Created 9 years, 3 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 #include "chrome_frame/test/net/fake_external_tab.h" 5 #include "chrome_frame/test/net/fake_external_tab.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 #include <exdisp.h> 9 #include <exdisp.h>
10 10
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 DCHECK(g_browser_process); 262 DCHECK(g_browser_process);
263 g_browser_process->SetApplicationLocale("en-US"); 263 g_browser_process->SetApplicationLocale("en-US");
264 264
265 RenderProcessHost::set_run_renderer_in_process(true); 265 RenderProcessHost::set_run_renderer_in_process(true);
266 266
267 browser_process_->local_state()->RegisterBooleanPref( 267 browser_process_->local_state()->RegisterBooleanPref(
268 prefs::kMetricsReportingEnabled, false); 268 prefs::kMetricsReportingEnabled, false);
269 269
270 FilePath profile_path(ProfileManager::GetDefaultProfileDir(user_data())); 270 FilePath profile_path(ProfileManager::GetDefaultProfileDir(user_data()));
271 271
272 Profile* profile =
273 g_browser_process->profile_manager()->GetProfile(profile_path);
274
275 // Initialize the content client which that code uses to talk to Chrome. 272 // Initialize the content client which that code uses to talk to Chrome.
276 content::SetContentClient(&g_chrome_content_client.Get()); 273 content::SetContentClient(&g_chrome_content_client.Get());
277 274
278 // Override the default ContentBrowserClient to let Chrome participate in 275 // Override the default ContentBrowserClient to let Chrome participate in
279 // content logic. Must be done before any tabs are created. 276 // content logic. Must be done before any tabs are created.
280 content::GetContentClient()->set_browser(&g_browser_client.Get()); 277 content::GetContentClient()->set_browser(&g_browser_client.Get());
281 278
282 content::GetContentClient()->set_renderer(&g_renderer_client.Get()); 279 content::GetContentClient()->set_renderer(&g_renderer_client.Get());
283 280
284 // Create the child threads. 281 Profile* profile =
282 g_browser_process->profile_manager()->GetProfile(profile_path);
283
284 // Create the child threads.
285 g_browser_process->db_thread(); 285 g_browser_process->db_thread();
286 g_browser_process->file_thread(); 286 g_browser_process->file_thread();
287 g_browser_process->io_thread(); 287 g_browser_process->io_thread();
288 } 288 }
289 289
290 void FakeExternalTab::Shutdown() { 290 void FakeExternalTab::Shutdown() {
291 browser_process_.reset(); 291 browser_process_.reset();
292 g_browser_process = NULL; 292 g_browser_process = NULL;
293 process_singleton_.reset(); 293 process_singleton_.reset();
294 294
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL); 583 base::KillProcesses(chrome_frame_test::kIEImageName, 0, NULL);
584 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL); 584 base::KillProcesses(chrome_frame_test::kIEBrokerImageName, 0, NULL);
585 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which 585 // Avoid CRT cleanup in debug test runs to ensure that webkit ASSERTs which
586 // check if globals are created and destroyed on the same thread don't fire. 586 // check if globals are created and destroyed on the same thread don't fire.
587 // Webkit global objects are created on the inproc renderer thread. 587 // Webkit global objects are created on the inproc renderer thread.
588 #if !defined(NDEBUG) 588 #if !defined(NDEBUG)
589 ExitProcess(test_suite.test_result()); 589 ExitProcess(test_suite.test_result());
590 #endif // NDEBUG 590 #endif // NDEBUG
591 return test_suite.test_result(); 591 return test_suite.test_result();
592 } 592 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698