summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_provider.cc7
-rw-r--r--chrome/browser/automation/automation_provider.h3
-rw-r--r--chrome/browser/automation/url_request_slow_download_job.cc20
-rw-r--r--chrome/browser/automation/url_request_slow_download_job.h6
4 files changed, 17 insertions, 19 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 81d0137..067302a 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -2100,17 +2100,14 @@ void AutomationProvider::GetDownloadDirectory(
}
}
-#if defined(OS_WIN)
-// TODO(port): Remove windowsisms.
-void AutomationProvider::OpenNewBrowserWindow(int show_command) {
+void AutomationProvider::OpenNewBrowserWindow(bool show) {
// We may have no current browser windows open so don't rely on
// asking an existing browser to execute the IDC_NEWWINDOW command
Browser* browser = Browser::Create(profile_);
browser->AddBlankTab(true);
- if (show_command != SW_HIDE)
+ if (show)
browser->window()->Show();
}
-#endif // defined(OS_WIN)
void AutomationProvider::GetWindowForBrowser(int browser_handle,
bool* success,
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index 0c4f876..eafd5fe 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -266,7 +266,8 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
void GetAutocompleteEditForBrowser(int browser_handle, bool* success,
int* autocomplete_edit_handle);
- void OpenNewBrowserWindow(int show_command);
+ // If |show| is true, call Show() on the new window after creating it.
+ void OpenNewBrowserWindow(bool show);
void ShowInterstitialPage(int tab_handle,
const std::string& html_text,
diff --git a/chrome/browser/automation/url_request_slow_download_job.cc b/chrome/browser/automation/url_request_slow_download_job.cc
index a4b7c6f..630eca1 100644
--- a/chrome/browser/automation/url_request_slow_download_job.cc
+++ b/chrome/browser/automation/url_request_slow_download_job.cc
@@ -14,12 +14,12 @@
const int kFirstDownloadSize = 1024 * 35;
const int kSecondDownloadSize = 1024 * 10;
-const wchar_t URLRequestSlowDownloadJob::kUnknownSizeUrl[] =
- L"http://url.handled.by.slow.download/download-unknown-size";
-const wchar_t URLRequestSlowDownloadJob::kKnownSizeUrl[] =
- L"http://url.handled.by.slow.download/download-known-size";
-const wchar_t URLRequestSlowDownloadJob::kFinishDownloadUrl[] =
- L"http://url.handled.by.slow.download/download-finish";
+const char URLRequestSlowDownloadJob::kUnknownSizeUrl[] =
+ "http://url.handled.by.slow.download/download-unknown-size";
+const char URLRequestSlowDownloadJob::kKnownSizeUrl[] =
+ "http://url.handled.by.slow.download/download-known-size";
+const char URLRequestSlowDownloadJob::kFinishDownloadUrl[] =
+ "http://url.handled.by.slow.download/download-finish";
std::vector<URLRequestSlowDownloadJob*>
URLRequestSlowDownloadJob::kPendingRequests;
@@ -32,11 +32,11 @@ void URLRequestSlowDownloadJob::Start() {
/* static */
void URLRequestSlowDownloadJob::AddUITestUrls() {
URLRequestFilter* filter = URLRequestFilter::GetInstance();
- filter->AddUrlHandler(GURL(WideToUTF8(kUnknownSizeUrl)),
+ filter->AddUrlHandler(GURL(kUnknownSizeUrl),
&URLRequestSlowDownloadJob::Factory);
- filter->AddUrlHandler(GURL(WideToUTF8(kKnownSizeUrl)),
+ filter->AddUrlHandler(GURL(kKnownSizeUrl),
&URLRequestSlowDownloadJob::Factory);
- filter->AddUrlHandler(GURL(WideToUTF8(kFinishDownloadUrl)),
+ filter->AddUrlHandler(GURL(kFinishDownloadUrl),
&URLRequestSlowDownloadJob::Factory);
}
@@ -44,7 +44,7 @@ void URLRequestSlowDownloadJob::AddUITestUrls() {
URLRequestJob* URLRequestSlowDownloadJob::Factory(URLRequest* request,
const std::string& scheme) {
URLRequestSlowDownloadJob* job = new URLRequestSlowDownloadJob(request);
- if (request->url().spec() != WideToUTF8(kFinishDownloadUrl))
+ if (request->url().spec() != kFinishDownloadUrl)
URLRequestSlowDownloadJob::kPendingRequests.push_back(job);
return job;
}
diff --git a/chrome/browser/automation/url_request_slow_download_job.h b/chrome/browser/automation/url_request_slow_download_job.h
index 29cf57a..eee858a 100644
--- a/chrome/browser/automation/url_request_slow_download_job.h
+++ b/chrome/browser/automation/url_request_slow_download_job.h
@@ -32,9 +32,9 @@ class URLRequestSlowDownloadJob : public URLRequestJob {
const std::string& scheme);
// Test URLs.
- static const wchar_t kUnknownSizeUrl[];
- static const wchar_t kKnownSizeUrl[];
- static const wchar_t kFinishDownloadUrl[];
+ static const char kUnknownSizeUrl[];
+ static const char kKnownSizeUrl[];
+ static const char kFinishDownloadUrl[];
// For UI tests: adds the testing URLs to the URLRequestFilter.
static void AddUITestUrls();