#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/thumbnails/render_widget_snapshot_taker.h"
#include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/common/url_constants.h"
#include "chrome/installer/util/google_update_constants.h"
#include "components/policy/core/common/policy_service.h"
+#include "components/translate/core/browser/translate_download_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/notification_details.h"
#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)
created_safe_browsing_service_(false),
module_ref_count_(0),
did_start_(false),
- checked_for_new_frames_(false),
- using_new_frames_(false),
- render_widget_snapshot_taker_(new RenderWidgetSnapshotTaker),
download_status_updater_(new DownloadStatusUpdater),
local_state_task_runner_(local_state_task_runner) {
g_browser_process = this;
#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();
return gpu_mode_manager_.get();
}
-RenderWidgetSnapshotTaker* BrowserProcessImpl::GetRenderWidgetSnapshotTaker() {
- return render_widget_snapshot_taker_.get();
-}
-
AutomationProviderList* BrowserProcessImpl::GetAutomationProviderList() {
DCHECK(CalledOnValidThread());
#if defined(ENABLE_AUTOMATION)
locale_ = locale;
extension_l10n_util::SetProcessLocale(locale);
chrome::ChromeContentBrowserClient::SetApplicationLocale(locale);
+ TranslateDownloadManager::GetInstance()->set_application_locale(locale);
}
DownloadStatusUpdater* BrowserProcessImpl::download_status_updater() {
#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;
#endif
#if !defined(OS_ANDROID) && !defined(OS_IOS)
- storage_monitor_.reset(StorageMonitor::Create());
+ StorageMonitor::Create();
#endif
platform_part_->PreMainMessageLoopRun();