summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/automation/automation_provider.cc5
-rw-r--r--chrome/browser/automation/automation_provider_list.cc11
-rw-r--r--chrome/browser/automation/automation_provider_list.h5
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc27
-rw-r--r--chrome/browser/background/background_mode_manager.cc5
-rw-r--r--chrome/browser/browser_process.h2
-rw-r--r--chrome/browser/browser_process_impl.cc7
-rw-r--r--chrome/browser/browser_process_impl.h105
-rw-r--r--chrome/browser/chromeos/cros/login_library.cc7
-rw-r--r--chrome/browser/profiles/profile_impl.cc15
-rw-r--r--chrome/browser/ui/browser_init.cc3
-rw-r--r--chrome/browser/ui/tests/browser_uitest.cc4
-rw-r--r--chrome/test/automation/proxy_launcher.cc1
-rw-r--r--chrome/test/base/testing_browser_process.cc2
-rw-r--r--chrome/test/base/testing_browser_process.h102
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc7
16 files changed, 155 insertions, 153 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 968c7c2..9f036f4 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -129,7 +129,6 @@ AutomationProvider::AutomationProvider(Profile* profile)
metric_event_duration_observer_.reset(new MetricEventDurationObserver());
extension_test_result_observer_.reset(
new ExtensionTestResultNotificationObserver(this));
- g_browser_process->AddRefModule();
TRACE_EVENT_END_ETW("AutomationProvider::AutomationProvider", 0, "");
}
@@ -137,8 +136,6 @@ AutomationProvider::AutomationProvider(Profile* profile)
AutomationProvider::~AutomationProvider() {
if (channel_.get())
channel_->Close();
-
- g_browser_process->ReleaseModule();
}
bool AutomationProvider::InitializeChannel(const std::string& channel_id) {
@@ -458,7 +455,7 @@ void AutomationProvider::OnChannelError() {
VLOG(1) << "Error reinitializing AutomationProvider channel.";
}
VLOG(1) << "AutomationProxy went away, shutting down app.";
- AutomationProviderList::GetInstance()->RemoveProvider(this);
+ g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
}
bool AutomationProvider::Send(IPC::Message* msg) {
diff --git a/chrome/browser/automation/automation_provider_list.cc b/chrome/browser/automation/automation_provider_list.cc
index 5e3afec..540a91e 100644
--- a/chrome/browser/automation/automation_provider_list.cc
+++ b/chrome/browser/automation/automation_provider_list.cc
@@ -9,8 +9,6 @@
#include "base/logging.h"
#include "chrome/browser/automation/automation_provider.h"
-AutomationProviderList* AutomationProviderList::instance_ = NULL;
-
AutomationProviderList::AutomationProviderList() {
}
@@ -20,7 +18,6 @@ AutomationProviderList::~AutomationProviderList() {
(*iter)->Release();
iter = automation_providers_.erase(iter);
}
- instance_ = NULL;
}
bool AutomationProviderList::AddProvider(AutomationProvider* provider) {
@@ -41,11 +38,3 @@ bool AutomationProviderList::RemoveProvider(AutomationProvider* provider) {
}
return false;
}
-
-AutomationProviderList* AutomationProviderList::GetInstance() {
- if (!instance_) {
- instance_ = new AutomationProviderList;
- }
- DCHECK(NULL != instance_);
- return instance_;
-}
diff --git a/chrome/browser/automation/automation_provider_list.h b/chrome/browser/automation/automation_provider_list.h
index 47145fa..1ee0d8e 100644
--- a/chrome/browser/automation/automation_provider_list.h
+++ b/chrome/browser/automation/automation_provider_list.h
@@ -14,6 +14,7 @@ class AutomationProvider;
// Stores a list of all AutomationProvider objects.
class AutomationProviderList {
public:
+ AutomationProviderList();
~AutomationProviderList();
typedef std::vector<AutomationProvider*> list_type;
typedef list_type::iterator iterator;
@@ -35,13 +36,9 @@ class AutomationProviderList {
return automation_providers_.size();
}
- static AutomationProviderList* GetInstance();
-
private:
- AutomationProviderList();
void OnLastProviderRemoved();
list_type automation_providers_;
- static AutomationProviderList* instance_;
DISALLOW_COPY_AND_ASSIGN(AutomationProviderList);
};
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index c3d2fd9..b60f01c 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -782,14 +782,21 @@ void TestingAutomationProvider::ExecuteBrowserCommandAsync(int handle,
int command,
bool* success) {
*success = false;
- if (browser_tracker_->ContainsHandle(handle)) {
- Browser* browser = browser_tracker_->GetResource(handle);
- if (browser->command_updater()->SupportsCommand(command) &&
- browser->command_updater()->IsCommandEnabled(command)) {
- browser->ExecuteCommand(command);
- *success = true;
- }
+ if (!browser_tracker_->ContainsHandle(handle)) {
+ LOG(WARNING) << "Browser tracker does not contain handle: " << handle;
+ return;
}
+ Browser* browser = browser_tracker_->GetResource(handle);
+ if (!browser->command_updater()->SupportsCommand(command)) {
+ LOG(WARNING) << "Browser does not support command: " << command;
+ return;
+ }
+ if (!browser->command_updater()->IsCommandEnabled(command)) {
+ LOG(WARNING) << "Browser command not enabled: " << command;
+ return;
+ }
+ browser->ExecuteCommand(command);
+ *success = true;
}
void TestingAutomationProvider::ExecuteBrowserCommand(
@@ -6190,7 +6197,8 @@ void TestingAutomationProvider::CreateNewAutomationProvider(
return;
}
provider->SetExpectedTabCount(0);
- g_browser_process->InitAutomationProviderList()->AddProvider(provider);
+ DCHECK(g_browser_process);
+ g_browser_process->GetAutomationProviderList()->AddProvider(provider);
reply.SendSuccess(NULL);
}
@@ -6346,5 +6354,6 @@ void TestingAutomationProvider::OnRedirectQueryComplete(
}
void TestingAutomationProvider::OnRemoveProvider() {
- AutomationProviderList::GetInstance()->RemoveProvider(this);
+ if (g_browser_process)
+ g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
}
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
index 045f086..6355c44 100644
--- a/chrome/browser/background/background_mode_manager.cc
+++ b/chrome/browser/background/background_mode_manager.cc
@@ -406,7 +406,8 @@ void BackgroundModeManager::EndKeepAliveForStartup() {
void BackgroundModeManager::StartBackgroundMode() {
// Don't bother putting ourselves in background mode if we're already there
// or if background mode is disabled.
- if (in_background_mode_ || !IsBackgroundModePrefEnabled())
+ if (in_background_mode_ ||
+ (!IsBackgroundModePrefEnabled() && !keep_alive_for_test_))
return;
// Mark ourselves as running in background mode.
@@ -606,6 +607,8 @@ bool BackgroundModeManager::IsBackgroundModePermanentlyDisabled(
// always disabled on chromeos since chrome is always running on that
// platform, making it superfluous.
#if defined(OS_CHROMEOS)
+ if (command_line->HasSwitch(switches::kKeepAliveForTest))
+ return false;
return true;
#else
bool background_mode_disabled =
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
index c0a3fc4..aee0036 100644
--- a/chrome/browser/browser_process.h
+++ b/chrome/browser/browser_process.h
@@ -155,7 +155,7 @@ class BrowserProcess {
virtual ThumbnailGenerator* GetThumbnailGenerator() = 0;
- virtual AutomationProviderList* InitAutomationProviderList() = 0;
+ virtual AutomationProviderList* GetAutomationProviderList() = 0;
virtual void InitDevToolsHttpProtocolHandler(
Profile* profile,
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 11e1467..9f4d82f 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -525,11 +525,10 @@ ThumbnailGenerator* BrowserProcessImpl::GetThumbnailGenerator() {
return &thumbnail_generator_;
}
-AutomationProviderList* BrowserProcessImpl::InitAutomationProviderList() {
+AutomationProviderList* BrowserProcessImpl::GetAutomationProviderList() {
DCHECK(CalledOnValidThread());
- if (automation_provider_list_.get() == NULL) {
- automation_provider_list_.reset(AutomationProviderList::GetInstance());
- }
+ if (automation_provider_list_.get() == NULL)
+ automation_provider_list_.reset(new AutomationProviderList());
return automation_provider_list_.get();
}
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
index 6ee8521..de9b990 100644
--- a/chrome/browser/browser_process_impl.h
+++ b/chrome/browser/browser_process_impl.h
@@ -49,84 +49,87 @@ class BrowserProcessImpl : public BrowserProcess,
explicit BrowserProcessImpl(const CommandLine& command_line);
virtual ~BrowserProcessImpl();
- virtual void EndSession();
+ base::Thread* process_launcher_thread();
// BrowserProcess methods
- virtual ResourceDispatcherHost* resource_dispatcher_host();
- virtual MetricsService* metrics_service();
- virtual IOThread* io_thread();
- virtual base::Thread* file_thread();
- virtual base::Thread* db_thread();
- virtual base::Thread* process_launcher_thread();
- virtual base::Thread* cache_thread();
- virtual WatchDogThread* watchdog_thread();
+ virtual void EndSession() OVERRIDE;
+ virtual ResourceDispatcherHost* resource_dispatcher_host() OVERRIDE;
+ virtual MetricsService* metrics_service() OVERRIDE;
+ virtual IOThread* io_thread() OVERRIDE;
+ virtual base::Thread* file_thread() OVERRIDE;
+ virtual base::Thread* db_thread() OVERRIDE;
+ virtual base::Thread* cache_thread() OVERRIDE;
+ virtual WatchDogThread* watchdog_thread() OVERRIDE;
#if defined(OS_CHROMEOS)
- virtual base::Thread* web_socket_proxy_thread();
+ virtual base::Thread* web_socket_proxy_thread() OVERRIDE;
#endif
- virtual ProfileManager* profile_manager();
- virtual PrefService* local_state();
- virtual DevToolsManager* devtools_manager();
- virtual SidebarManager* sidebar_manager();
- virtual ui::Clipboard* clipboard();
- virtual net::URLRequestContextGetter* system_request_context();
+ virtual ProfileManager* profile_manager() OVERRIDE;
+ virtual PrefService* local_state() OVERRIDE;
+ virtual DevToolsManager* devtools_manager() OVERRIDE;
+ virtual SidebarManager* sidebar_manager() OVERRIDE;
+ virtual ui::Clipboard* clipboard() OVERRIDE;
+ virtual net::URLRequestContextGetter* system_request_context() OVERRIDE;
#if defined(OS_CHROMEOS)
virtual chromeos::ProxyConfigServiceImpl*
- chromeos_proxy_config_service_impl();
+ chromeos_proxy_config_service_impl() OVERRIDE;
#endif // defined(OS_CHROMEOS)
- virtual ExtensionEventRouterForwarder* extension_event_router_forwarder();
- virtual NotificationUIManager* notification_ui_manager();
- virtual policy::BrowserPolicyConnector* browser_policy_connector();
- virtual IconManager* icon_manager();
- virtual ThumbnailGenerator* GetThumbnailGenerator();
- virtual AutomationProviderList* InitAutomationProviderList();
+ virtual ExtensionEventRouterForwarder*
+ extension_event_router_forwarder() OVERRIDE;
+ virtual NotificationUIManager* notification_ui_manager() OVERRIDE;
+ virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE;
+ virtual IconManager* icon_manager() OVERRIDE;
+ virtual ThumbnailGenerator* GetThumbnailGenerator() OVERRIDE;
+ virtual AutomationProviderList* GetAutomationProviderList() OVERRIDE;
virtual void InitDevToolsHttpProtocolHandler(
Profile* profile,
const std::string& ip,
int port,
- const std::string& frontend_url);
- virtual void InitDevToolsLegacyProtocolHandler(int port);
- virtual unsigned int AddRefModule();
- virtual unsigned int ReleaseModule();
- virtual bool IsShuttingDown();
- virtual printing::PrintJobManager* print_job_manager();
- virtual printing::PrintPreviewTabController* print_preview_tab_controller();
- virtual printing::BackgroundPrintingManager* background_printing_manager();
- virtual GoogleURLTracker* google_url_tracker();
- virtual IntranetRedirectDetector* intranet_redirect_detector();
- virtual const std::string& GetApplicationLocale();
- virtual void SetApplicationLocale(const std::string& locale);
- virtual DownloadStatusUpdater* download_status_updater();
- virtual DownloadRequestLimiter* download_request_limiter();
- virtual TabCloseableStateWatcher* tab_closeable_state_watcher();
- virtual BackgroundModeManager* background_mode_manager();
- virtual StatusTray* status_tray();
- virtual SafeBrowsingService* safe_browsing_service();
+ const std::string& frontend_url) OVERRIDE;
+ virtual void InitDevToolsLegacyProtocolHandler(int port) OVERRIDE;
+ virtual unsigned int AddRefModule() OVERRIDE;
+ virtual unsigned int ReleaseModule() OVERRIDE;
+ virtual bool IsShuttingDown() OVERRIDE;
+ virtual printing::PrintJobManager* print_job_manager() OVERRIDE;
+ virtual printing::PrintPreviewTabController*
+ print_preview_tab_controller() OVERRIDE;
+ virtual printing::BackgroundPrintingManager*
+ background_printing_manager() OVERRIDE;
+ virtual GoogleURLTracker* google_url_tracker() OVERRIDE;
+ virtual IntranetRedirectDetector* intranet_redirect_detector() OVERRIDE;
+ virtual const std::string& GetApplicationLocale() OVERRIDE;
+ virtual void SetApplicationLocale(const std::string& locale) OVERRIDE;
+ virtual DownloadStatusUpdater* download_status_updater() OVERRIDE;
+ virtual DownloadRequestLimiter* download_request_limiter() OVERRIDE;
+ virtual TabCloseableStateWatcher* tab_closeable_state_watcher() OVERRIDE;
+ virtual BackgroundModeManager* background_mode_manager() OVERRIDE;
+ virtual StatusTray* status_tray() OVERRIDE;
+ virtual SafeBrowsingService* safe_browsing_service() OVERRIDE;
virtual safe_browsing::ClientSideDetectionService*
- safe_browsing_detection_service();
- virtual bool plugin_finder_disabled() const;
+ safe_browsing_detection_service() OVERRIDE;
+ virtual bool plugin_finder_disabled() const OVERRIDE;
// NotificationObserver methods
virtual void Observe(int type,
const NotificationSource& source,
- const NotificationDetails& details);
+ const NotificationDetails& details) OVERRIDE;
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
- virtual void StartAutoupdateTimer();
+ virtual void StartAutoupdateTimer() OVERRIDE;
#endif
- virtual ChromeNetLog* net_log();
+ virtual ChromeNetLog* net_log() OVERRIDE;
- virtual prerender::PrerenderTracker* prerender_tracker();
+ virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE;
#if defined(IPC_MESSAGE_LOG_ENABLED)
- virtual void SetIPCLoggingEnabled(bool enable);
+ virtual void SetIPCLoggingEnabled(bool enable) OVERRIDE;
#endif
- virtual MHTMLGenerationManager* mhtml_generation_manager();
+ virtual MHTMLGenerationManager* mhtml_generation_manager() OVERRIDE;
- virtual GpuBlacklistUpdater* gpu_blacklist_updater();
+ virtual GpuBlacklistUpdater* gpu_blacklist_updater() OVERRIDE;
- virtual ComponentUpdateService* component_updater();
+ virtual ComponentUpdateService* component_updater() OVERRIDE;
private:
void CreateResourceDispatcherHost();
diff --git a/chrome/browser/chromeos/cros/login_library.cc b/chrome/browser/chromeos/cros/login_library.cc
index f149965..4bd2f13 100644
--- a/chrome/browser/chromeos/cros/login_library.cc
+++ b/chrome/browser/chromeos/cros/login_library.cc
@@ -37,12 +37,7 @@ class LoginLibraryImpl : public LoginLibrary {
}
void EmitLoginPromptReady() {
- if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- NewRunnableMethod(this, &LoginLibraryImpl::EmitLoginPromptReady));
- return;
- }
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
chromeos::EmitLoginPromptReady();
}
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 0dd2005..ad4bd04 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -392,12 +392,17 @@ void ProfileImpl::DoFinalInit() {
// Initialize the BackgroundModeManager - this has to be done here before
// InitExtensions() is called because it relies on receiving notifications
// when extensions are loaded. BackgroundModeManager is not needed under
- // ChromeOS because Chrome is always running (no need for special keep-alive
- // or launch-on-startup support).
-#if !defined(OS_CHROMEOS)
- if (g_browser_process->background_mode_manager())
- g_browser_process->background_mode_manager()->RegisterProfile(this);
+ // ChromeOS because Chrome is always running, no need for special keep-alive
+ // or launch-on-startup support unless kKeepAliveForTest is set.
+ bool init_background_mode_manager = true;
+#if defined(OS_CHROMEOS)
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kKeepAliveForTest))
+ init_background_mode_manager = false;
#endif
+ if (init_background_mode_manager) {
+ if (g_browser_process->background_mode_manager())
+ g_browser_process->background_mode_manager()->RegisterProfile(this);
+ }
extension_info_map_ = new ExtensionInfoMap();
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index 01d775c..25053b7 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -1505,8 +1505,7 @@ bool BrowserInit::CreateAutomationProvider(const std::string& channel_id,
return false;
automation->SetExpectedTabCount(expected_tabs);
- AutomationProviderList* list =
- g_browser_process->InitAutomationProviderList();
+ AutomationProviderList* list = g_browser_process->GetAutomationProviderList();
DCHECK(list);
list->AddProvider(automation);
diff --git a/chrome/browser/ui/tests/browser_uitest.cc b/chrome/browser/ui/tests/browser_uitest.cc
index 00b4d95..5819f0a 100644
--- a/chrome/browser/ui/tests/browser_uitest.cc
+++ b/chrome/browser/ui/tests/browser_uitest.cc
@@ -220,6 +220,10 @@ TEST_F(RunInBackgroundTest, RunInBackgroundBasicTest) {
ASSERT_TRUE(automation()->OpenNewBrowserWindow(Browser::TYPE_TABBED, true));
ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count));
EXPECT_EQ(1, window_count);
+ // Set the shutdown type to 'SESSION_ENDING' since we are running in
+ // background mode and neither closing all the windows nor quitting will
+ // shut down the browser.
+ set_shutdown_type(ProxyLauncher::SESSION_ENDING);
}
// Tests to ensure that the browser continues running in the background after
diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc
index 928b84c9..34c4060 100644
--- a/chrome/test/automation/proxy_launcher.cc
+++ b/chrome/test/automation/proxy_launcher.cc
@@ -254,6 +254,7 @@ void ProxyLauncher::QuitBrowser() {
automation()->GetBrowserWindow(0);
EXPECT_TRUE(browser_proxy.get());
if (browser_proxy.get()) {
+ EXPECT_TRUE(browser_proxy->is_valid());
EXPECT_TRUE(browser_proxy->ApplyAccelerator(IDC_CLOSE_WINDOW));
browser_proxy = NULL;
}
diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc
index f86f6d5..0eb4908 100644
--- a/chrome/test/base/testing_browser_process.cc
+++ b/chrome/test/base/testing_browser_process.cc
@@ -165,7 +165,7 @@ IntranetRedirectDetector* TestingBrowserProcess::intranet_redirect_detector() {
return NULL;
}
-AutomationProviderList* TestingBrowserProcess::InitAutomationProviderList() {
+AutomationProviderList* TestingBrowserProcess::GetAutomationProviderList() {
return NULL;
}
diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h
index 5659875..c056057 100644
--- a/chrome/test/base/testing_browser_process.h
+++ b/chrome/test/base/testing_browser_process.h
@@ -47,78 +47,80 @@ class TestingBrowserProcess : public BrowserProcess {
TestingBrowserProcess();
virtual ~TestingBrowserProcess();
- virtual void EndSession();
- virtual ResourceDispatcherHost* resource_dispatcher_host();
- virtual MetricsService* metrics_service();
- virtual IOThread* io_thread();
+ virtual void EndSession() OVERRIDE;
+ virtual ResourceDispatcherHost* resource_dispatcher_host() OVERRIDE;
+ virtual MetricsService* metrics_service() OVERRIDE;
+ virtual IOThread* io_thread() OVERRIDE;
- virtual base::Thread* file_thread();
- virtual base::Thread* db_thread();
- virtual base::Thread* cache_thread();
- virtual WatchDogThread* watchdog_thread();
+ virtual base::Thread* file_thread() OVERRIDE;
+ virtual base::Thread* db_thread() OVERRIDE;
+ virtual base::Thread* cache_thread() OVERRIDE;
+ virtual WatchDogThread* watchdog_thread() OVERRIDE;
#if defined(OS_CHROMEOS)
- virtual base::Thread* web_socket_proxy_thread();
+ virtual base::Thread* web_socket_proxy_thread() OVERRIDE;
#endif
- virtual ProfileManager* profile_manager();
- virtual PrefService* local_state();
- virtual policy::BrowserPolicyConnector* browser_policy_connector();
- virtual IconManager* icon_manager();
- virtual ThumbnailGenerator* GetThumbnailGenerator();
- virtual DevToolsManager* devtools_manager();
- virtual SidebarManager* sidebar_manager();
- virtual TabCloseableStateWatcher* tab_closeable_state_watcher();
- virtual BackgroundModeManager* background_mode_manager();
- virtual StatusTray* status_tray();
- virtual SafeBrowsingService* safe_browsing_service();
+ virtual ProfileManager* profile_manager() OVERRIDE;
+ virtual PrefService* local_state() OVERRIDE;
+ virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE;
+ virtual IconManager* icon_manager() OVERRIDE;
+ virtual ThumbnailGenerator* GetThumbnailGenerator() OVERRIDE;
+ virtual DevToolsManager* devtools_manager() OVERRIDE;
+ virtual SidebarManager* sidebar_manager() OVERRIDE;
+ virtual TabCloseableStateWatcher* tab_closeable_state_watcher() OVERRIDE;
+ virtual BackgroundModeManager* background_mode_manager() OVERRIDE;
+ virtual StatusTray* status_tray() OVERRIDE;
+ virtual SafeBrowsingService* safe_browsing_service() OVERRIDE;
virtual safe_browsing::ClientSideDetectionService*
- safe_browsing_detection_service();
- virtual net::URLRequestContextGetter* system_request_context();
+ safe_browsing_detection_service() OVERRIDE;
+ virtual net::URLRequestContextGetter* system_request_context() OVERRIDE;
#if defined(OS_CHROMEOS)
virtual chromeos::ProxyConfigServiceImpl*
- chromeos_proxy_config_service_impl();
+ chromeos_proxy_config_service_impl() OVERRIDE;
#endif // defined(OS_CHROMEOS)
- virtual ui::Clipboard* clipboard();
- virtual ExtensionEventRouterForwarder* extension_event_router_forwarder();
- virtual NotificationUIManager* notification_ui_manager();
- virtual GoogleURLTracker* google_url_tracker();
- virtual IntranetRedirectDetector* intranet_redirect_detector();
- virtual AutomationProviderList* InitAutomationProviderList();
+ virtual ui::Clipboard* clipboard() OVERRIDE;
+ virtual ExtensionEventRouterForwarder*
+ extension_event_router_forwarder() OVERRIDE;
+ virtual NotificationUIManager* notification_ui_manager() OVERRIDE;
+ virtual GoogleURLTracker* google_url_tracker() OVERRIDE;
+ virtual IntranetRedirectDetector* intranet_redirect_detector() OVERRIDE;
+ virtual AutomationProviderList* GetAutomationProviderList() OVERRIDE;
virtual void InitDevToolsHttpProtocolHandler(
Profile* profile,
const std::string& ip,
int port,
- const std::string& frontend_url);
- virtual void InitDevToolsLegacyProtocolHandler(int port);
- virtual unsigned int AddRefModule();
- virtual unsigned int ReleaseModule();
- virtual bool IsShuttingDown();
- virtual printing::PrintJobManager* print_job_manager();
- virtual printing::PrintPreviewTabController* print_preview_tab_controller();
- virtual printing::BackgroundPrintingManager* background_printing_manager();
- virtual const std::string& GetApplicationLocale();
- virtual void SetApplicationLocale(const std::string& app_locale);
- virtual DownloadStatusUpdater* download_status_updater();
- virtual DownloadRequestLimiter* download_request_limiter();
- virtual bool plugin_finder_disabled() const;
- virtual void CheckForInspectorFiles() {}
+ const std::string& frontend_url) OVERRIDE;
+ virtual void InitDevToolsLegacyProtocolHandler(int port) OVERRIDE;
+ virtual unsigned int AddRefModule() OVERRIDE;
+ virtual unsigned int ReleaseModule() OVERRIDE;
+ virtual bool IsShuttingDown() OVERRIDE;
+ virtual printing::PrintJobManager* print_job_manager() OVERRIDE;
+ virtual printing::PrintPreviewTabController*
+ print_preview_tab_controller() OVERRIDE;
+ virtual printing::BackgroundPrintingManager*
+ background_printing_manager() OVERRIDE;
+ virtual const std::string& GetApplicationLocale() OVERRIDE;
+ virtual void SetApplicationLocale(const std::string& app_locale) OVERRIDE;
+ virtual DownloadStatusUpdater* download_status_updater() OVERRIDE;
+ virtual DownloadRequestLimiter* download_request_limiter() OVERRIDE;
+ virtual bool plugin_finder_disabled() const OVERRIDE;
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
- virtual void StartAutoupdateTimer() {}
+ virtual void StartAutoupdateTimer() OVERRIDE {}
#endif
- virtual ChromeNetLog* net_log();
- virtual prerender::PrerenderTracker* prerender_tracker();
+ virtual ChromeNetLog* net_log() OVERRIDE;
+ virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE;
#if defined(IPC_MESSAGE_LOG_ENABLED)
- virtual void SetIPCLoggingEnabled(bool enable) {}
+ virtual void SetIPCLoggingEnabled(bool enable) OVERRIDE {}
#endif
- virtual MHTMLGenerationManager* mhtml_generation_manager();
- virtual GpuBlacklistUpdater* gpu_blacklist_updater();
- virtual ComponentUpdateService* component_updater();
+ virtual MHTMLGenerationManager* mhtml_generation_manager() OVERRIDE;
+ virtual GpuBlacklistUpdater* gpu_blacklist_updater() OVERRIDE;
+ virtual ComponentUpdateService* component_updater() OVERRIDE;
// Set the local state for tests. Consumer is responsible for cleaning it up
// afterwards (using ScopedTestingLocalState, for example).
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index 880d393..b27d666 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -375,11 +375,10 @@ void CFUrlRequestUnittestRunner::OnConnectAutomationProviderToChannel(
Profile* profile = g_browser_process->profile_manager()->
GetDefaultProfile(fake_chrome_.user_data());
- AutomationProviderList* list =
- g_browser_process->InitAutomationProviderList();
+ AutomationProviderList* list = g_browser_process->GetAutomationProviderList();
DCHECK(list);
- list->AddProvider(TestAutomationProvider::NewAutomationProvider(profile,
- channel_id, this));
+ list->AddProvider(
+ TestAutomationProvider::NewAutomationProvider(profile, channel_id, this));
}
void CFUrlRequestUnittestRunner::OnInitialTabLoaded() {