summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 09:38:38 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 09:38:38 +0000
commit71cbd00ce4c63af41f3d9a3c2acffc301600813b (patch)
treeb9b790d01e4af1a61c22342126996d13911e901c /chrome/browser
parentbd7105a8391c87c2c3e443392f58aa2b1a61dcbf (diff)
downloadchromium_src-71cbd00ce4c63af41f3d9a3c2acffc301600813b.zip
chromium_src-71cbd00ce4c63af41f3d9a3c2acffc301600813b.tar.gz
chromium_src-71cbd00ce4c63af41f3d9a3c2acffc301600813b.tar.bz2
Make startup_tests build and run on Linux (except reference tests).
Review URL: http://codereview.chromium.org/27240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10978 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_init.cc17
-rw-r--r--chrome/browser/browser_init.h2
-rw-r--r--chrome/browser/browser_main.cc1
3 files changed, 7 insertions, 13 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index d4ec343..eb9e965 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -12,6 +12,8 @@
#include "base/string_util.h"
#include "base/sys_info.h"
#include "chrome/browser/autocomplete/autocomplete.h"
+#include "chrome/browser/automation/automation_provider.h"
+#include "chrome/browser/automation/automation_provider_list.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extensions_service.h"
@@ -37,8 +39,6 @@
#if defined(OS_WIN)
#include "base/win_util.h"
-#include "chrome/browser/automation/automation_provider.h"
-#include "chrome/browser/automation/automation_provider_list.h"
#include "chrome/common/resource_bundle.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -445,7 +445,6 @@ bool BrowserInit::ProcessCommandLine(
}
}
-#if defined(OS_WIN)
// Look for the testing channel ID ONLY during process startup
if (command_line.HasSwitch(switches::kTestingChannelID)) {
std::wstring testing_channel_id =
@@ -456,7 +455,9 @@ bool BrowserInit::ProcessCommandLine(
// new tab; if there are none then we get one homepage tab.
int expected_tab_count = 1;
if (command_line.HasSwitch(switches::kRestoreLastSession)) {
- StringToInt(command_line.GetSwitchValue(switches::kRestoreLastSession),
+ std::wstring restore_session_value(
+ command_line.GetSwitchValue(switches::kRestoreLastSession));
+ StringToInt(WideToUTF16Hack(restore_session_value),
&expected_tab_count);
} else {
expected_tab_count =
@@ -467,7 +468,6 @@ bool BrowserInit::ProcessCommandLine(
profile,
static_cast<size_t>(expected_tab_count));
}
-#endif
}
// Allow the command line to override the persisted setting of home page.
@@ -477,7 +477,6 @@ bool BrowserInit::ProcessCommandLine(
prefs->transient()->SetBoolean(prefs::kStartRenderersManually, true);
bool silent_launch = false;
-#if defined(OS_WIN)
if (command_line.HasSwitch(switches::kAutomationClientChannelID)) {
std::wstring automation_channel_id =
command_line.GetSwitchValue(switches::kAutomationClientChannelID);
@@ -491,7 +490,6 @@ bool BrowserInit::ProcessCommandLine(
CreateAutomationProvider<AutomationProvider>(automation_channel_id,
profile, expected_tabs);
}
-#endif
if (command_line.HasSwitch(switches::kLoadExtension)) {
std::wstring path_string =
@@ -531,7 +529,6 @@ bool BrowserInit::LaunchBrowser(const CommandLine& command_line,
return result;
}
-#if defined(OS_WIN)
template <class AutomationProviderClass>
void BrowserInit::CreateAutomationProvider(const std::wstring& channel_id,
Profile* profile,
@@ -542,10 +539,10 @@ void BrowserInit::CreateAutomationProvider(const std::wstring& channel_id,
automation->SetExpectedTabCount(expected_tabs);
AutomationProviderList* list =
- g_browser_process->InitAutomationProviderList(); DCHECK(list);
+ g_browser_process->InitAutomationProviderList();
+ DCHECK(list);
list->AddProvider(automation);
}
-#endif
bool BrowserInit::LaunchBrowserImpl(const CommandLine& command_line,
Profile* profile,
diff --git a/chrome/browser/browser_init.h b/chrome/browser/browser_init.h
index e37ab69..909df4f5 100644
--- a/chrome/browser/browser_init.h
+++ b/chrome/browser/browser_init.h
@@ -102,12 +102,10 @@ class BrowserInit {
Profile* profile, const std::wstring& cur_dir,
bool process_startup, int* return_code);
-#if defined(OS_WIN)
template <class AutomationProviderClass>
static void CreateAutomationProvider(const std::wstring& channel_id,
Profile* profile,
size_t expected_tabs);
-#endif
private:
// Does the work of LaunchBrowser returning the result.
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 28d52b5..1d097b5 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -65,7 +65,6 @@
#include "base/registry.h"
#include "base/win_util.h"
-#include "chrome/browser/automation/automation_provider.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_trial.h"
#include "chrome/browser/extensions/extension_protocols.h"