diff options
author | thiago.santos@intel.com <thiago.santos@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-17 18:57:17 +0000 |
---|---|---|
committer | thiago.santos@intel.com <thiago.santos@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-17 18:57:17 +0000 |
commit | e4c5f97bbe47b29dd306b13087422a85c6afb2a1 (patch) | |
tree | dab060bd4768fed2d884b42a63a59db5d8e77a78 /chrome/browser/browser_process_impl.cc | |
parent | 3eb20115ec1c4f07aba2f0f3eec63da789a28ebc (diff) | |
download | chromium_src-e4c5f97bbe47b29dd306b13087422a85c6afb2a1.zip chromium_src-e4c5f97bbe47b29dd306b13087422a85c6afb2a1.tar.gz chromium_src-e4c5f97bbe47b29dd306b13087422a85c6afb2a1.tar.bz2 |
Make storage_monitor a component
Move storage_monitor to the components directory and:
- Make the unit tests part of the components unit tests.
- Update the include headers for both chrome and storage_monitor code.
- Update the buildsystem dependencies and paths.
- Update the DEPS files for both chrome and storage_monitor with the new
restrictions.
R=joi@chromium.org,thestig@chromium.org
BUG=
Review URL: https://codereview.chromium.org/152343005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251699 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 7fec85c..681515c 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -64,7 +64,6 @@ #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/shell_integration.h" #include "chrome/browser/status_icons/status_tray.h" -#include "chrome/browser/storage_monitor/storage_monitor.h" #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/browser_finder.h" @@ -112,6 +111,7 @@ #if !defined(OS_ANDROID) && !defined(OS_IOS) #include "chrome/browser/media_galleries/media_file_system_registry.h" +#include "components/storage_monitor/storage_monitor.h" #endif #if defined(ENABLE_PLUGIN_INSTALLATION) @@ -263,11 +263,11 @@ void BrowserProcessImpl::StartTearDown() { #if !defined(OS_ANDROID) && !defined(OS_IOS) media_file_system_registry_.reset(); - // Delete |storage_monitor_| now. Otherwise the FILE thread would be gone - // when we try to release it in the dtor and Valgrind would report a - // leak on almost every single browser_test. + // Remove the global instance of the Storage Monitor now. Otherwise the + // FILE thread would be gone when we try to release it in the dtor and + // Valgrind would report a leak on almost every single browser_test. // TODO(gbillock): Make this unnecessary. - storage_monitor_.reset(); + StorageMonitor::Destroy(); #endif message_center::MessageCenter::Shutdown(); @@ -644,21 +644,6 @@ BookmarkPromptController* BrowserProcessImpl::bookmark_prompt_controller() { #endif } -StorageMonitor* BrowserProcessImpl::storage_monitor() { -#if defined(OS_ANDROID) || defined(OS_IOS) - return NULL; -#else - return storage_monitor_.get(); -#endif -} - -void BrowserProcessImpl::set_storage_monitor_for_test( - scoped_ptr<StorageMonitor> monitor) { -#if !defined(OS_ANDROID) && !defined(OS_IOS) - storage_monitor_ = monitor.Pass(); -#endif -} - MediaFileSystemRegistry* BrowserProcessImpl::media_file_system_registry() { #if defined(OS_ANDROID) || defined(OS_IOS) return NULL; @@ -970,7 +955,7 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { #endif #if !defined(OS_ANDROID) && !defined(OS_IOS) - storage_monitor_.reset(StorageMonitor::Create()); + StorageMonitor::Create(); #endif platform_part_->PreMainMessageLoopRun(); |