| 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 "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "chrome/browser/apps/chrome_apps_client.h" |
| 10 #include "chrome/browser/background/background_mode_manager.h" | 11 #include "chrome/browser/background/background_mode_manager.h" |
| 11 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/browser_process_impl.h" | 13 #include "chrome/browser/browser_process_impl.h" |
| 13 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" | 14 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" |
| 14 #include "chrome/browser/printing/print_job_manager.h" | 15 #include "chrome/browser/printing/print_job_manager.h" |
| 15 #include "chrome/browser/profiles/profile_manager.h" | 16 #include "chrome/browser/profiles/profile_manager.h" |
| 16 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" | 17 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" |
| 17 #include "chrome/test/base/testing_browser_process_platform_part.h" | 18 #include "chrome/test/base/testing_browser_process_platform_part.h" |
| 18 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
| 19 #include "net/url_request/url_request_context_getter.h" | 20 #include "net/url_request/url_request_context_getter.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 : notification_service_(content::NotificationService::Create()), | 67 : notification_service_(content::NotificationService::Create()), |
| 67 module_ref_count_(0), | 68 module_ref_count_(0), |
| 68 app_locale_("en"), | 69 app_locale_("en"), |
| 69 local_state_(NULL), | 70 local_state_(NULL), |
| 70 io_thread_(NULL), | 71 io_thread_(NULL), |
| 71 system_request_context_(NULL), | 72 system_request_context_(NULL), |
| 72 platform_part_(new TestingBrowserProcessPlatformPart()), | 73 platform_part_(new TestingBrowserProcessPlatformPart()), |
| 73 extensions_browser_client_( | 74 extensions_browser_client_( |
| 74 new extensions::ChromeExtensionsBrowserClient) { | 75 new extensions::ChromeExtensionsBrowserClient) { |
| 75 extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get()); | 76 extensions::ExtensionsBrowserClient::Set(extensions_browser_client_.get()); |
| 77 apps::AppsClient::Set(ChromeAppsClient::GetInstance()); |
| 76 } | 78 } |
| 77 | 79 |
| 78 TestingBrowserProcess::~TestingBrowserProcess() { | 80 TestingBrowserProcess::~TestingBrowserProcess() { |
| 79 EXPECT_FALSE(local_state_); | 81 EXPECT_FALSE(local_state_); |
| 80 #if defined(ENABLE_CONFIGURATION_POLICY) | 82 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 81 SetBrowserPolicyConnector(NULL); | 83 SetBrowserPolicyConnector(NULL); |
| 82 #endif | 84 #endif |
| 83 extensions::ExtensionsBrowserClient::Set(NULL); | 85 extensions::ExtensionsBrowserClient::Set(NULL); |
| 84 | 86 |
| 85 // Destructors for some objects owned by TestingBrowserProcess will use | 87 // Destructors for some objects owned by TestingBrowserProcess will use |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 431 |
| 430 /////////////////////////////////////////////////////////////////////////////// | 432 /////////////////////////////////////////////////////////////////////////////// |
| 431 | 433 |
| 432 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { | 434 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { |
| 433 TestingBrowserProcess::CreateInstance(); | 435 TestingBrowserProcess::CreateInstance(); |
| 434 } | 436 } |
| 435 | 437 |
| 436 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { | 438 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { |
| 437 TestingBrowserProcess::DeleteInstance(); | 439 TestingBrowserProcess::DeleteInstance(); |
| 438 } | 440 } |
| OLD | NEW |