| 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" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 void TestingBrowserProcess::set_background_mode_manager_for_test( | 204 void TestingBrowserProcess::set_background_mode_manager_for_test( |
| 205 scoped_ptr<BackgroundModeManager> manager) { | 205 scoped_ptr<BackgroundModeManager> manager) { |
| 206 NOTREACHED(); | 206 NOTREACHED(); |
| 207 } | 207 } |
| 208 | 208 |
| 209 StatusTray* TestingBrowserProcess::status_tray() { | 209 StatusTray* TestingBrowserProcess::status_tray() { |
| 210 return nullptr; | 210 return nullptr; |
| 211 } | 211 } |
| 212 | 212 |
| 213 SafeBrowsingService* TestingBrowserProcess::safe_browsing_service() { | 213 safe_browsing::SafeBrowsingService* |
| 214 TestingBrowserProcess::safe_browsing_service() { |
| 214 #if defined(OS_IOS) | 215 #if defined(OS_IOS) |
| 215 NOTIMPLEMENTED(); | 216 NOTIMPLEMENTED(); |
| 216 return nullptr; | 217 return nullptr; |
| 217 #else | 218 #else |
| 218 return sb_service_.get(); | 219 return sb_service_.get(); |
| 219 #endif | 220 #endif |
| 220 } | 221 } |
| 221 | 222 |
| 222 safe_browsing::ClientSideDetectionService* | 223 safe_browsing::ClientSideDetectionService* |
| 223 TestingBrowserProcess::safe_browsing_detection_service() { | 224 TestingBrowserProcess::safe_browsing_detection_service() { |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 #if defined(ENABLE_CONFIGURATION_POLICY) | 439 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 439 if (browser_policy_connector_) | 440 if (browser_policy_connector_) |
| 440 browser_policy_connector_->Shutdown(); | 441 browser_policy_connector_->Shutdown(); |
| 441 browser_policy_connector_.reset(); | 442 browser_policy_connector_.reset(); |
| 442 #else | 443 #else |
| 443 CHECK(false); | 444 CHECK(false); |
| 444 #endif | 445 #endif |
| 445 } | 446 } |
| 446 | 447 |
| 447 void TestingBrowserProcess::SetSafeBrowsingService( | 448 void TestingBrowserProcess::SetSafeBrowsingService( |
| 448 SafeBrowsingService* sb_service) { | 449 safe_browsing::SafeBrowsingService* sb_service) { |
| 449 #if defined(OS_IOS) | 450 #if defined(OS_IOS) |
| 450 NOTIMPLEMENTED(); | 451 NOTIMPLEMENTED(); |
| 451 #else | 452 #else |
| 452 sb_service_ = sb_service; | 453 sb_service_ = sb_service; |
| 453 #endif | 454 #endif |
| 454 } | 455 } |
| 455 | 456 |
| 456 /////////////////////////////////////////////////////////////////////////////// | 457 /////////////////////////////////////////////////////////////////////////////// |
| 457 | 458 |
| 458 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { | 459 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { |
| 459 TestingBrowserProcess::CreateInstance(); | 460 TestingBrowserProcess::CreateInstance(); |
| 460 } | 461 } |
| 461 | 462 |
| 462 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { | 463 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { |
| 463 TestingBrowserProcess::DeleteInstance(); | 464 TestingBrowserProcess::DeleteInstance(); |
| 464 } | 465 } |
| OLD | NEW |