| OLD | NEW |
| 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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.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/apps/chrome_apps_client.h" | 11 #include "chrome/browser/apps/chrome_apps_client.h" |
| 12 #include "chrome/browser/background/background_mode_manager.h" | 12 #include "chrome/browser/background/background_mode_manager.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/browser_process_impl.h" | 14 #include "chrome/browser/browser_process_impl.h" |
| 15 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" | 15 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" |
| 16 #include "chrome/browser/network_time/network_time_tracker.h" | |
| 17 #include "chrome/browser/printing/print_job_manager.h" | 16 #include "chrome/browser/printing/print_job_manager.h" |
| 18 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
| 19 #include "chrome/test/base/testing_browser_process_platform_part.h" | 18 #include "chrome/test/base/testing_browser_process_platform_part.h" |
| 19 #include "components/network_time/network_time_tracker.h" |
| 20 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
| 21 #include "net/url_request/url_request_context_getter.h" | 21 #include "net/url_request/url_request_context_getter.h" |
| 22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
| 23 #include "ui/message_center/message_center.h" | 23 #include "ui/message_center/message_center.h" |
| 24 | 24 |
| 25 #if !defined(OS_IOS) | 25 #if !defined(OS_IOS) |
| 26 #include "chrome/browser/notifications/notification_ui_manager.h" | 26 #include "chrome/browser/notifications/notification_ui_manager.h" |
| 27 #include "chrome/browser/prerender/prerender_tracker.h" | 27 #include "chrome/browser/prerender/prerender_tracker.h" |
| 28 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 28 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 29 #endif | 29 #endif |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 bool TestingBrowserProcess::created_local_state() const { | 355 bool TestingBrowserProcess::created_local_state() const { |
| 356 return (local_state_ != NULL); | 356 return (local_state_ != NULL); |
| 357 } | 357 } |
| 358 | 358 |
| 359 #if defined(ENABLE_WEBRTC) | 359 #if defined(ENABLE_WEBRTC) |
| 360 WebRtcLogUploader* TestingBrowserProcess::webrtc_log_uploader() { | 360 WebRtcLogUploader* TestingBrowserProcess::webrtc_log_uploader() { |
| 361 return NULL; | 361 return NULL; |
| 362 } | 362 } |
| 363 #endif | 363 #endif |
| 364 | 364 |
| 365 NetworkTimeTracker* TestingBrowserProcess::network_time_tracker() { | 365 network_time::NetworkTimeTracker* |
| 366 TestingBrowserProcess::network_time_tracker() { |
| 366 if (!network_time_tracker_) { | 367 if (!network_time_tracker_) { |
| 367 DCHECK(local_state_); | 368 DCHECK(local_state_); |
| 368 network_time_tracker_.reset(new NetworkTimeTracker( | 369 network_time_tracker_.reset(new network_time::NetworkTimeTracker( |
| 369 scoped_ptr<base::TickClock>(new base::DefaultTickClock()), | 370 scoped_ptr<base::TickClock>(new base::DefaultTickClock()), |
| 370 local_state_)); | 371 local_state_)); |
| 371 } | 372 } |
| 372 return network_time_tracker_.get(); | 373 return network_time_tracker_.get(); |
| 373 } | 374 } |
| 374 | 375 |
| 375 void TestingBrowserProcess::SetSystemRequestContext( | 376 void TestingBrowserProcess::SetSystemRequestContext( |
| 376 net::URLRequestContextGetter* context_getter) { | 377 net::URLRequestContextGetter* context_getter) { |
| 377 system_request_context_ = context_getter; | 378 system_request_context_ = context_getter; |
| 378 } | 379 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 | 426 |
| 426 /////////////////////////////////////////////////////////////////////////////// | 427 /////////////////////////////////////////////////////////////////////////////// |
| 427 | 428 |
| 428 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { | 429 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { |
| 429 TestingBrowserProcess::CreateInstance(); | 430 TestingBrowserProcess::CreateInstance(); |
| 430 } | 431 } |
| 431 | 432 |
| 432 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { | 433 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { |
| 433 TestingBrowserProcess::DeleteInstance(); | 434 TestingBrowserProcess::DeleteInstance(); |
| 434 } | 435 } |
| OLD | NEW |