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

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

Issue 2121403002: Enabling TabManager on testing browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modified comment Created 4 years, 5 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
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | no next file » | 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/testing_browser_process.h" 5 #include "chrome/test/base/testing_browser_process.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/time/default_clock.h" 8 #include "base/time/default_clock.h"
9 #include "base/time/default_tick_clock.h" 9 #include "base/time/default_tick_clock.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/browser_process_impl.h" 12 #include "chrome/browser/browser_process_impl.h"
13 #include "chrome/browser/lifetime/application_lifetime.h" 13 #include "chrome/browser/lifetime/application_lifetime.h"
14 #include "chrome/browser/memory/tab_manager.h"
14 #include "chrome/browser/notifications/notification_platform_bridge.h" 15 #include "chrome/browser/notifications/notification_platform_bridge.h"
15 #include "chrome/browser/notifications/notification_ui_manager.h" 16 #include "chrome/browser/notifications/notification_ui_manager.h"
16 #include "chrome/browser/printing/print_job_manager.h" 17 #include "chrome/browser/printing/print_job_manager.h"
17 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
18 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 19 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
19 #include "chrome/common/features.h" 20 #include "chrome/common/features.h"
20 #include "chrome/test/base/testing_browser_process_platform_part.h" 21 #include "chrome/test/base/testing_browser_process_platform_part.h"
21 #include "components/network_time/network_time_tracker.h" 22 #include "components/network_time/network_time_tracker.h"
22 #include "components/policy/core/browser/browser_policy_connector.h" 23 #include "components/policy/core/browser/browser_policy_connector.h"
23 #include "components/prefs/pref_service.h" 24 #include "components/prefs/pref_service.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 local_state_, system_request_context())); 363 local_state_, system_request_context()));
363 } 364 }
364 return network_time_tracker_.get(); 365 return network_time_tracker_.get();
365 } 366 }
366 367
367 gcm::GCMDriver* TestingBrowserProcess::gcm_driver() { 368 gcm::GCMDriver* TestingBrowserProcess::gcm_driver() {
368 return nullptr; 369 return nullptr;
369 } 370 }
370 371
371 memory::TabManager* TestingBrowserProcess::GetTabManager() { 372 memory::TabManager* TestingBrowserProcess::GetTabManager() {
373 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
374 if (!tab_manager_.get())
375 tab_manager_.reset(new memory::TabManager());
376 return tab_manager_.get();
377 #else
372 return nullptr; 378 return nullptr;
379 #endif
373 } 380 }
374 381
375 shell_integration::DefaultWebClientState 382 shell_integration::DefaultWebClientState
376 TestingBrowserProcess::CachedDefaultWebClientState() { 383 TestingBrowserProcess::CachedDefaultWebClientState() {
377 return shell_integration::UNKNOWN_DEFAULT; 384 return shell_integration::UNKNOWN_DEFAULT;
378 } 385 }
379 void TestingBrowserProcess::SetSystemRequestContext( 386 void TestingBrowserProcess::SetSystemRequestContext(
380 net::URLRequestContextGetter* context_getter) { 387 net::URLRequestContextGetter* context_getter) {
381 system_request_context_ = context_getter; 388 system_request_context_ = context_getter;
382 } 389 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 448
442 /////////////////////////////////////////////////////////////////////////////// 449 ///////////////////////////////////////////////////////////////////////////////
443 450
444 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { 451 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() {
445 TestingBrowserProcess::CreateInstance(); 452 TestingBrowserProcess::CreateInstance();
446 } 453 }
447 454
448 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { 455 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() {
449 TestingBrowserProcess::DeleteInstance(); 456 TestingBrowserProcess::DeleteInstance();
450 } 457 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_browser_process.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698