summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-01 20:24:01 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-01 20:24:01 +0000
commitb112a4cc460212188d353b995a055f6e14029ba3 (patch)
treed4d9d51c6f59535b3b0b993db128c4ca2558858a
parent721e54858f0fb90a19ca3ea697b6f37ba127850d (diff)
downloadchromium_src-b112a4cc460212188d353b995a055f6e14029ba3.zip
chromium_src-b112a4cc460212188d353b995a055f6e14029ba3.tar.gz
chromium_src-b112a4cc460212188d353b995a055f6e14029ba3.tar.bz2
Will the real BrowserProcessImpl please stand up?
Review URL: http://codereview.chromium.org/19743 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9030 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser.scons1
-rw-r--r--chrome/browser/browser_main.cc4
-rw-r--r--chrome/browser/browser_prefs.cc4
-rw-r--r--chrome/browser/browser_process_impl.cc46
-rw-r--r--chrome/browser/browser_process_impl.h7
-rw-r--r--chrome/browser/first_run.h4
-rw-r--r--chrome/browser/resource_message_filter.h5
-rw-r--r--chrome/chrome.xcodeproj/project.pbxproj2
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc81
-rw-r--r--chrome/common/temp_scaffolding_stubs.h169
10 files changed, 175 insertions, 148 deletions
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index 630259c..3af4093 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -691,7 +691,6 @@ if not env.Bit('windows'):
'browser_about_handler.cc',
'browser_accessibility.cc',
'browser_accessibility_manager.cc',
- 'browser_process_impl.cc',
'browser_shutdown.cc',
'browser_url_handler.cc',
'browsing_data_remover.cc',
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 0898d44..84f1482 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -24,6 +24,8 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_prefs.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/browser_process_impl.h"
+#include "chrome/browser/first_run.h"
#include "chrome/browser/plugin_service.h"
#include "chrome/browser/profile_manager.h"
#include "chrome/browser/shell_integration.h"
@@ -59,12 +61,10 @@
#include "base/win_util.h"
#include "chrome/browser/automation/automation_provider.h"
#include "chrome/browser/browser.h"
-#include "chrome/browser/browser_process_impl.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/browser_trial.h"
#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
#include "chrome/browser/extensions/extension_protocols.h"
-#include "chrome/browser/first_run.h"
#include "chrome/browser/jankometer.h"
#include "chrome/browser/message_window.h"
#include "chrome/browser/metrics/metrics_service.h"
diff --git a/chrome/browser/browser_prefs.cc b/chrome/browser/browser_prefs.cc
index ca50616..da18c3f 100644
--- a/chrome/browser/browser_prefs.cc
+++ b/chrome/browser/browser_prefs.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/browser.h"
#include "chrome/browser/session_startup_pref.h"
+#include "chrome/browser/google_url_tracker.h"
#if defined(OS_WIN)
#include "chrome/browser/browser_shutdown.h"
@@ -13,7 +14,6 @@
#include "chrome/browser/net/dns_global.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/external_protocol_handler.h"
-#include "chrome/browser/google_url_tracker.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/renderer_host/browser_render_process_host.h"
@@ -35,6 +35,7 @@ namespace browser {
void RegisterAllPrefs(PrefService* user_prefs, PrefService* local_state) {
// Prefs in Local State
+ GoogleURLTracker::RegisterPrefs(local_state);
#if defined(OS_WIN)
BookmarkManagerView::RegisterPrefs(local_state);
Browser::RegisterPrefs(local_state);
@@ -42,7 +43,6 @@ void RegisterAllPrefs(PrefService* user_prefs, PrefService* local_state) {
browser_shutdown::RegisterPrefs(local_state);
CacheManagerHost::RegisterPrefs(local_state);
chrome_browser_net::RegisterPrefs(local_state);
- GoogleURLTracker::RegisterPrefs(local_state);
MetricsLog::RegisterPrefs(local_state);
MetricsService::RegisterPrefs(local_state);
PageInfoWindow::RegisterPrefs(local_state);
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 550254c..0ddfd17 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -8,30 +8,33 @@
#include "base/path_service.h"
#include "base/thread.h"
#include "base/waitable_event.h"
-#include "chrome/browser/automation/automation_provider_list.h"
#include "chrome/browser/browser_trial.h"
#include "chrome/browser/chrome_thread.h"
+#include "chrome/browser/google_url_tracker.h"
+#include "chrome/browser/plugin_service.h"
+#include "chrome/browser/profile_manager.h"
+#include "chrome/browser/renderer_host/render_process_host.h"
+#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/notification_service.h"
+#include "chrome/common/pref_names.h"
+#include "chrome/common/pref_service.h"
+
+#if defined(OS_WIN)
+#include "chrome/browser/automation/automation_provider_list.h"
#include "chrome/browser/download/download_file.h"
#include "chrome/browser/download/save_file_manager.h"
-#include "chrome/browser/google_url_tracker.h"
#include "chrome/browser/icon_manager.h"
#include "chrome/browser/metrics/metrics_service.h"
-#include "chrome/browser/plugin_service.h"
#include "chrome/browser/printing/print_job_manager.h"
-#include "chrome/browser/profile_manager.h"
-#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/debugger/debugger_wrapper.h"
-#include "chrome/common/chrome_paths.h"
-#include "chrome/common/chrome_switches.h"
#include "chrome/common/clipboard_service.h"
#include "chrome/common/l10n_util.h"
-#include "chrome/common/notification_service.h"
-#include "chrome/common/pref_names.h"
-#include "chrome/common/pref_service.h"
#include "chrome/views/accelerator_handler.h"
#include "chrome/views/view_storage.h"
+#endif
namespace {
@@ -58,8 +61,10 @@ class BrowserProcessSubThread : public ChromeThread {
protected:
virtual void Init() {
+#if defined(OS_WIN)
// Initializes the COM library on the current thread.
CoInitialize(NULL);
+#endif
notification_service_ = new NotificationService;
}
@@ -68,9 +73,11 @@ class BrowserProcessSubThread : public ChromeThread {
delete notification_service_;
notification_service_ = NULL;
+#if defined(OS_WIN)
// Closes the COM library on the current thread. CoInitialize must
// be balanced by a corresponding call to CoUninitialize.
CoUninitialize();
+#endif
}
private:
@@ -90,10 +97,10 @@ BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line)
created_db_thread_(false),
created_profile_manager_(false),
created_local_state_(false),
- created_icon_manager_(false),
initialized_broker_services_(false),
- created_debugger_wrapper_(false),
broker_services_(NULL),
+ created_icon_manager_(false),
+ created_debugger_wrapper_(false),
module_ref_count_(0),
memory_model_(MEDIUM_MEMORY_MODEL),
checked_for_new_frames_(false),
@@ -191,8 +198,12 @@ BrowserProcessImpl::~BrowserProcessImpl() {
print_job_manager_->OnQuit();
print_job_manager_.reset();
+ // TODO(port): remove this completely from BrowserProcessImpl, it has no
+ // business being here.
+#if defined(OS_WIN)
// The ViewStorage needs to go before the NotificationService.
views::ViewStorage::DeleteSharedInstance();
+#endif
// Now OK to destroy NotificationService.
main_notification_service_.reset();
@@ -206,8 +217,10 @@ static void PostQuit(MessageLoop* message_loop) {
}
void BrowserProcessImpl::EndSession() {
+#if defined(OS_WIN)
// Notify we are going away.
::SetEvent(shutdown_event_->handle());
+#endif
// Mark all the profiles as clean.
ProfileManager* pm = profile_manager();
@@ -244,10 +257,15 @@ printing::PrintJobManager* BrowserProcessImpl::print_job_manager() {
const std::wstring& BrowserProcessImpl::GetApplicationLocale() {
DCHECK(CalledOnValidThread());
+#if defined(OS_WIN)
if (locale_.empty()) {
locale_ = l10n_util::GetApplicationLocale(local_state()->GetString(
prefs::kApplicationLocale));
}
+#else
+ NOTIMPLEMENTED();
+ // TODO(port): port l10n_util
+#endif
return locale_;
}
@@ -349,10 +367,14 @@ void BrowserProcessImpl::CreateDebuggerWrapper(int port) {
}
void BrowserProcessImpl::CreateAcceleratorHandler() {
+#if defined(OS_WIN)
DCHECK(accelerator_handler_.get() == NULL);
scoped_ptr<views::AcceleratorHandler> accelerator_handler(
new views::AcceleratorHandler);
accelerator_handler_.swap(accelerator_handler);
+#else
+ // TODO(port): remove this completely, it has no business being here.
+#endif
}
void BrowserProcessImpl::CreateGoogleURLTracker() {
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index 8d059b3..07b09c4 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -18,9 +18,14 @@
#include "base/non_thread_safe.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/automation/automation_provider_list.h"
#include "chrome/browser/browser_process.h"
+
+#if defined(OS_WIN)
+#include "chrome/browser/automation/automation_provider_list.h"
#include "sandbox/src/sandbox.h"
+#else
+#include "chrome/common/temp_scaffolding_stubs.h"
+#endif
class CommandLine;
class NotificationService;
diff --git a/chrome/browser/first_run.h b/chrome/browser/first_run.h
index 32a32dc..8a8a3eb 100644
--- a/chrome/browser/first_run.h
+++ b/chrome/browser/first_run.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/command_line.h"
+#include "base/gfx/native_widget_types.h"
#include "chrome/browser/browser_process_impl.h"
class FilePath;
@@ -39,7 +40,8 @@ class FirstRun {
// Imports settings in a separate process. It spawns a second dedicated
// browser process that just does the import with the import progress UI.
static bool ImportSettings(Profile* profile, int browser,
- int items_to_import, HWND parent_window);
+ int items_to_import,
+ gfx::NativeView parent_window);
// Import browser items in this process. The browser and the items to
// import are encoded int the command line. This function is paired with
// FirstRun::ImportSettings(). This function might or might not show
diff --git a/chrome/browser/resource_message_filter.h b/chrome/browser/resource_message_filter.h
index 0d7b67d..43034b6 100644
--- a/chrome/browser/resource_message_filter.h
+++ b/chrome/browser/resource_message_filter.h
@@ -12,13 +12,16 @@
#include "base/ref_counted.h"
#include "build/build_config.h"
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
-#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/common/ipc_channel_proxy.h"
#include "chrome/common/notification_observer.h"
#include "webkit/glue/cache_manager.h"
#if defined(OS_WIN)
#include <windows.h>
+#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
+#else
+// TODO(port): port ResourceDispatcherHost.
+#include "chrome/common/temp_scaffolding_stubs.h"
#endif
class ClipboardService;
diff --git a/chrome/chrome.xcodeproj/project.pbxproj b/chrome/chrome.xcodeproj/project.pbxproj
index 71fbd8a..b185e9b 100644
--- a/chrome/chrome.xcodeproj/project.pbxproj
+++ b/chrome/chrome.xcodeproj/project.pbxproj
@@ -263,6 +263,7 @@
B5FDC2180EE48F4100BEC6E6 /* libicui18n.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D7BFE6D0E9D52DC009A6919 /* libicui18n.a */; };
B61C4C1F0F3284A700489E0F /* browser_init.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF83A0E9D4839009A6919 /* browser_init.cc */; };
B61C4CFA0F329ACE00489E0F /* browser_prefs.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF83F0E9D4839009A6919 /* browser_prefs.cc */; };
+ B61C4EDC0F34EE8300489E0F /* browser_process_impl.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D7BF8430E9D4839009A6919 /* browser_process_impl.cc */; };
B6CCB9FA0F1EC33100106F0D /* provisional_load_details.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6CCB9DE0F1EC32700106F0D /* provisional_load_details.cc */; };
B9BF55F87A4BB2FD366B6DDC /* template_url_parser.cc in Sources */ = {isa = PBXBuildFile; fileRef = 28AA584AB2ECFB33C7C7FD8A /* template_url_parser.cc */; };
E40CC5E30F2E348900708647 /* history_contents_provider.cc in Sources */ = {isa = PBXBuildFile; fileRef = E40CC5E10F2E348900708647 /* history_contents_provider.cc */; };
@@ -4512,6 +4513,7 @@
E450634F0EE9BE29003BE099 /* browser_main_mac.mm in Sources */,
B61C4CFA0F329ACE00489E0F /* browser_prefs.cc in Sources */,
4D7BF97B0E9D4857009A6919 /* browser_process.cc in Sources */,
+ B61C4EDC0F34EE8300489E0F /* browser_process_impl.cc in Sources */,
A76E43A40F29039C009A7E88 /* browser_render_process_host.cc in Sources */,
E45075B80F15060C003BE099 /* browser_trial.cc in Sources */,
E48B68640F2637B6002E47EC /* browser_window_cocoa.mm in Sources */,
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 7c25a78..e0824c4 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -12,6 +12,7 @@
#include "build/build_config.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_shutdown.h"
+#include "chrome/browser/first_run.h"
#include "chrome/browser/history/in_memory_history_backend.h"
#include "chrome/browser/plugin_service.h"
#include "chrome/browser/profile_manager.h"
@@ -25,59 +26,6 @@
// static
size_t SessionRestore::num_tabs_to_load_ = 0;
-BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line)
- : main_notification_service_(new NotificationService),
- memory_model_(HIGH_MEMORY_MODEL),
- created_local_state_(), created_metrics_service_(),
- created_profile_manager_() {
- g_browser_process = this;
-}
-
-BrowserProcessImpl::~BrowserProcessImpl() {
- g_browser_process = NULL;
-}
-
-void BrowserProcessImpl::CreateLocalState() {
- DCHECK(!created_local_state_ && local_state_.get() == NULL);
- created_local_state_ = true;
-
- std::wstring local_state_path;
- PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path);
- local_state_.reset(new PrefService(local_state_path));
-}
-
-void BrowserProcessImpl::CreateMetricsService() {
- DCHECK(!created_metrics_service_ && metrics_service_.get() == NULL);
- created_metrics_service_ = true;
-
- metrics_service_.reset(new MetricsService);
-}
-
-void BrowserProcessImpl::CreateProfileManager() {
- DCHECK(!created_profile_manager_ && profile_manager_.get() == NULL);
- created_profile_manager_ = true;
-
- profile_manager_.reset(new ProfileManager());
-}
-
-MetricsService* BrowserProcessImpl::metrics_service() {
- if (!created_metrics_service_)
- CreateMetricsService();
- return metrics_service_.get();
-}
-
-ProfileManager* BrowserProcessImpl::profile_manager() {
- if (!created_profile_manager_)
- CreateProfileManager();
- return profile_manager_.get();
-}
-
-PrefService* BrowserProcessImpl::local_state() {
- if (!created_local_state_)
- CreateLocalState();
- return local_state_.get();
-}
-
//--------------------------------------------------------------------------
UserDataManager* UserDataManager::instance_ = NULL;
@@ -111,6 +59,33 @@ void Shutdown() { }
void OnShutdownStarting(ShutdownType type) { }
}
+
+// static
+bool FirstRun::IsChromeFirstRun() { return false; }
+
+// static
+bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir,
+ const FilePath& master_prefs_path,
+ int* preference_details) {
+ return false;
+}
+
+// static
+int FirstRun::ImportNow(Profile* profile, const CommandLine& cmdline) {
+ return 0;
+}
+
+// static
+bool Upgrade::IsBrowserAlreadyRunning() { return false; }
+
+// static
+bool Upgrade::RelaunchChromeBrowser(const CommandLine& command_line) {
+ return true;
+}
+
+// static
+bool Upgrade::SwapNewChromeExeIfPresent() { return true; }
+
void OpenFirstRunDialog(Profile* profile) { }
GURL NewTabUIURL() {
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index 96f2b23..edc6b5c 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -13,12 +13,14 @@
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "base/gfx/rect.h"
#include "chrome/browser/bookmarks/bookmark_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/tab_contents/tab_contents_type.h"
+#include "chrome/common/ipc_message.h"
#include "chrome/common/page_transition_types.h"
#include "googleurl/src/gurl.h"
#include "skia/include/SkBitmap.h"
@@ -49,15 +51,6 @@ class WebContents;
//---------------------------------------------------------------------------
// These stubs are for Browser_main()
-class Upgrade {
- public:
- static bool IsBrowserAlreadyRunning() { return false; }
- static bool RelaunchChromeBrowser(const CommandLine& command_line) {
- return true;
- }
- static bool SwapNewChromeExeIfPresent() { return true; }
-};
-
// TODO(port): MessageWindow is very windows-specific, but provides the concept
// of singleton browser process per user-data-dir. Investigate how
// to achieve this on other platforms and see if this API works.
@@ -72,19 +65,6 @@ class MessageWindow {
void Unlock() { }
};
-class FirstRun {
- public:
- static bool IsChromeFirstRun() { return false; }
- static bool ProcessMasterPreferences(const FilePath& user_data_dir,
- const FilePath& master_prefs_path,
- int* preference_details) {
- return false;
- }
- static int ImportNow(Profile* profile, const CommandLine& cmdline) {
- return 0;
- }
-};
-
class GoogleUpdateSettings {
public:
static bool GetCollectStatsConsent() { return false; }
@@ -98,60 +78,9 @@ class GoogleUpdateSettings {
DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings);
};
-class BrowserProcessImpl : public BrowserProcess {
- public:
- BrowserProcessImpl(const CommandLine& command_line);
- virtual ~BrowserProcessImpl();
-
- virtual void EndSession() { }
- virtual ResourceDispatcherHost* resource_dispatcher_host() { return NULL; }
- virtual MetricsService* metrics_service();
- virtual ProfileManager* profile_manager();
- virtual PrefService* local_state();
- virtual DebuggerWrapper* debugger_wrapper() { return NULL; }
- virtual ClipboardService* clipboard_service() { return NULL; }
- virtual base::Thread* io_thread() { return NULL; }
- virtual base::Thread* file_thread() { return NULL; }
- virtual base::Thread* db_thread() { return NULL; }
- virtual sandbox::BrokerServices* broker_services() { return NULL; }
- virtual IconManager* icon_manager() { return NULL; }
- virtual void InitBrokerServices(sandbox::BrokerServices*) { }
- virtual AutomationProviderList* InitAutomationProviderList() { return NULL; }
- virtual void InitDebuggerWrapper(int port) { }
- virtual unsigned int AddRefModule() { return NULL; }
- virtual unsigned int ReleaseModule() { return NULL; }
- virtual bool IsShuttingDown() { return NULL; }
- virtual views::AcceleratorHandler* accelerator_handler() { return NULL; }
- virtual printing::PrintJobManager* print_job_manager() { return NULL; }
- virtual GoogleURLTracker* google_url_tracker() { return NULL; }
- virtual const std::wstring& GetApplicationLocale() { return locale_; }
- virtual MemoryModel memory_model() { return MEDIUM_MEMORY_MODEL; }
- virtual base::WaitableEvent* shutdown_event() { return NULL; }
- private:
- void CreateLocalState();
- void CreateProfileManager();
- void CreateMetricsService();
-
- scoped_ptr<NotificationService> main_notification_service_;
- MemoryModel memory_model_;
- bool created_local_state_;
- scoped_ptr<PrefService> local_state_;
- bool created_metrics_service_;
- scoped_ptr<MetricsService> metrics_service_;
- bool created_profile_manager_;
- scoped_ptr<ProfileManager> profile_manager_;
- std::wstring locale_;
-};
-
-class FirstRunBrowserProcess : public BrowserProcessImpl {
+class AutomationProviderList {
public:
- FirstRunBrowserProcess(const CommandLine& command_line)
- : BrowserProcessImpl(command_line) {
- }
- virtual ~FirstRunBrowserProcess() { }
- virtual GoogleURLTracker* google_url_tracker() { return NULL; }
- private:
- DISALLOW_COPY_AND_ASSIGN(FirstRunBrowserProcess);
+ static AutomationProviderList* GetInstance() { return NULL; }
};
class UserDataManager {
@@ -236,6 +165,8 @@ class MetricsService {
void StartRecordingOnly() { }
void Stop() { }
void SetUserPermitsUpload(bool enabled) { }
+ void RecordCleanShutdown() {}
+ void RecordStartOfSessionEnd() {}
};
namespace browser_shutdown {
@@ -254,6 +185,94 @@ void InstallJankometer(const CommandLine&);
GURL NewTabUIURL();
//---------------------------------------------------------------------------
+// These stubs are for BrowserProcessImpl
+
+class ClipboardService {
+};
+
+namespace printing {
+
+class PrintJobManager {
+ public:
+ void OnQuit() {}
+};
+
+} // namespace printing
+
+class SafeBrowsingService
+ : public base::RefCountedThreadSafe<SafeBrowsingService> {
+ public:
+ void ShutDown() {}
+};
+
+class DownloadFileManager
+ : public base::RefCountedThreadSafe<DownloadFileManager> {
+ public:
+ void Shutdown() {}
+};
+
+class SaveFileManager : public base::RefCountedThreadSafe<SaveFileManager> {
+ public:
+ void Shutdown() {}
+};
+
+namespace sandbox {
+
+class BrokerServices {
+ public:
+ void Init() {}
+};
+
+} // namespace sandbox
+
+class IconManager {
+};
+
+struct ViewHostMsg_Resource_Request;
+
+class ResourceDispatcherHost {
+ public:
+ explicit ResourceDispatcherHost(MessageLoop* loop) {}
+
+ class Receiver {
+ public:
+ virtual bool Send(IPC::Message* message) = 0;
+ };
+
+ void Initialize() {}
+ void Shutdown() {}
+
+ SafeBrowsingService* safe_browsing_service() {
+ return const_cast<SafeBrowsingService*>(&safe_browsing_service_);
+ }
+
+ DownloadFileManager* download_file_manager() {
+ return const_cast<DownloadFileManager*>(&download_file_manager_);
+ }
+
+ SaveFileManager* save_file_manager() {
+ return const_cast<SaveFileManager*>(&save_file_manager_);
+ }
+
+ private:
+ SafeBrowsingService safe_browsing_service_;
+ DownloadFileManager download_file_manager_;
+ SaveFileManager save_file_manager_;
+};
+
+class DebuggerWrapper : public base::RefCountedThreadSafe<DebuggerWrapper> {
+ public:
+ explicit DebuggerWrapper(int port) {}
+};
+
+namespace views {
+
+class AcceleratorHandler {
+};
+
+} // namespace views
+
+//---------------------------------------------------------------------------
// These stubs are for Browser
class SavePackage {