summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 03:02:51 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 03:02:51 +0000
commit57ecc4bf4069cb869e5fb0a7d922eec2384bac25 (patch)
tree1b4668fa59d6b6a072144b4ddab8d5f6faba3fa4 /chrome/test/automation
parent1af19cfd7b1ef9924516dbe811db495315feaefe (diff)
downloadchromium_src-57ecc4bf4069cb869e5fb0a7d922eec2384bac25.zip
chromium_src-57ecc4bf4069cb869e5fb0a7d922eec2384bac25.tar.gz
chromium_src-57ecc4bf4069cb869e5fb0a7d922eec2384bac25.tar.bz2
Make prefs use std::string for keys rather than wstrings.
Much remains to be converted. BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3076037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55660 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/automation_messages_internal.h8
-rw-r--r--chrome/test/automation/browser_proxy.cc14
-rw-r--r--chrome/test/automation/browser_proxy.h8
3 files changed, 15 insertions, 15 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index 65555c3..8e30bbc 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -812,7 +812,7 @@ IPC_BEGIN_MESSAGES(Automation)
// This messages sets an int-value preference.
IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetIntPreference,
int /* browser handle */,
- std::wstring /* pref name */,
+ std::string /* pref name */,
int /* value */,
bool /* success */)
@@ -831,21 +831,21 @@ IPC_BEGIN_MESSAGES(Automation)
// This messages sets a string-value preference.
IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetStringPreference,
int /* browser handle */,
- std::wstring /* pref name */,
+ std::string /* pref name */,
std::string /* pref value */,
bool)
// This messages gets a boolean-value preference.
IPC_SYNC_MESSAGE_ROUTED2_2(AutomationMsg_GetBooleanPreference,
int /* browser handle */,
- std::wstring /* pref name */,
+ std::string /* pref name */,
bool /* success */,
bool /* pref value */)
// This messages sets a boolean-value preference.
IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_SetBooleanPreference,
int /* browser handle */,
- std::wstring /* pref name */,
+ std::string /* pref name */,
bool /* pref value */,
bool /* success */)
diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc
index 41795e6..df3929a 100644
--- a/chrome/test/automation/browser_proxy.cc
+++ b/chrome/test/automation/browser_proxy.cc
@@ -400,7 +400,7 @@ bool BrowserProxy::SetShelfVisible(bool is_visible) {
is_visible));
}
-bool BrowserProxy::SetIntPreference(const std::wstring& name, int value) {
+bool BrowserProxy::SetIntPreference(const std::string& name, int value) {
if (!is_valid())
return false;
@@ -411,7 +411,7 @@ bool BrowserProxy::SetIntPreference(const std::wstring& name, int value) {
return result;
}
-bool BrowserProxy::SetStringPreference(const std::wstring& name,
+bool BrowserProxy::SetStringPreference(const std::string& name,
const std::string& value) {
if (!is_valid())
return false;
@@ -423,7 +423,7 @@ bool BrowserProxy::SetStringPreference(const std::wstring& name,
return result;
}
-bool BrowserProxy::GetBooleanPreference(const std::wstring& name,
+bool BrowserProxy::GetBooleanPreference(const std::string& name,
bool* value) {
if (!is_valid())
return false;
@@ -435,7 +435,7 @@ bool BrowserProxy::GetBooleanPreference(const std::wstring& name,
return result;
}
-bool BrowserProxy::SetBooleanPreference(const std::wstring& name,
+bool BrowserProxy::SetBooleanPreference(const std::string& name,
bool value) {
if (!is_valid())
return false;
@@ -620,7 +620,7 @@ bool BrowserProxy::GetInitialLoadTimes(float* min_start_time,
DictionaryValue* values_dict = static_cast<DictionaryValue*>(values.get());
Value* tabs_value;
- if (!values_dict->Get(L"tabs", &tabs_value) ||
+ if (!values_dict->Get("tabs", &tabs_value) ||
tabs_value->GetType() != Value::TYPE_LIST)
return false;
@@ -638,11 +638,11 @@ bool BrowserProxy::GetInitialLoadTimes(float* min_start_time,
tab_dict = static_cast<DictionaryValue*>(tab_value);
double temp;
- if (!tab_dict->GetReal(L"load_start_ms", &temp))
+ if (!tab_dict->GetReal("load_start_ms", &temp))
return false;
start_ms = static_cast<float>(temp);
// load_stop_ms can only be null if WaitForInitialLoads did not run.
- if (!tab_dict->GetReal(L"load_stop_ms", &temp))
+ if (!tab_dict->GetReal("load_stop_ms", &temp))
return false;
stop_ms = static_cast<float>(temp);
diff --git a/chrome/test/automation/browser_proxy.h b/chrome/test/automation/browser_proxy.h
index 70fd140..7dd2671 100644
--- a/chrome/test/automation/browser_proxy.h
+++ b/chrome/test/automation/browser_proxy.h
@@ -181,18 +181,18 @@ class BrowserProxy : public AutomationResourceProxy {
bool SetShelfVisible(bool is_visible) WARN_UNUSED_RESULT;
// Sets the int value of the specified preference.
- bool SetIntPreference(const std::wstring& name, int value) WARN_UNUSED_RESULT;
+ bool SetIntPreference(const std::string& name, int value) WARN_UNUSED_RESULT;
// Sets the string value of the specified preference.
- bool SetStringPreference(const std::wstring& name,
+ bool SetStringPreference(const std::string& name,
const std::string& value) WARN_UNUSED_RESULT;
// Gets the boolean value of the specified preference.
- bool GetBooleanPreference(const std::wstring& name,
+ bool GetBooleanPreference(const std::string& name,
bool* value) WARN_UNUSED_RESULT;
// Sets the boolean value of the specified preference.
- bool SetBooleanPreference(const std::wstring& name,
+ bool SetBooleanPreference(const std::string& name,
bool value) WARN_UNUSED_RESULT;
// Sets default content settings.