summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-14 17:25:32 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-14 17:25:32 +0000
commita748ff66516fb10dc810589036e4f2c5ccd07f93 (patch)
treed269ac5b2ec729f54169a3fd42ea736a4e7894a3 /chrome/browser/automation
parent96d1ed0c4184d446832d5b04ed4f02994b79ae03 (diff)
downloadchromium_src-a748ff66516fb10dc810589036e4f2c5ccd07f93.zip
chromium_src-a748ff66516fb10dc810589036e4f2c5ccd07f93.tar.gz
chromium_src-a748ff66516fb10dc810589036e4f2c5ccd07f93.tar.bz2
Convert remaining wide extension_automation_constants keys.
BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3187003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56143 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_provider.cc12
-rw-r--r--chrome/browser/automation/extension_automation_constants.cc26
-rw-r--r--chrome/browser/automation/extension_automation_constants.h26
3 files changed, 32 insertions, 32 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 8cffdbf..fbec798 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -2272,9 +2272,9 @@ void AutomationProvider::GetOmniboxInfo(Browser* browser,
void AutomationProvider::SetOmniboxText(Browser* browser,
DictionaryValue* args,
IPC::Message* reply_message) {
- std::wstring text;
+ string16 text;
AutomationJSONReply reply(this, reply_message);
- if (!args->GetString(L"text", &text)) {
+ if (!args->GetString("text", &text)) {
reply.SendError("text missing");
return;
}
@@ -2282,7 +2282,7 @@ void AutomationProvider::SetOmniboxText(Browser* browser,
LocationBar* loc_bar = browser->window()->GetLocationBar();
AutocompleteEditView* edit_view = loc_bar->location_entry();
edit_view->model()->OnSetFocus(false);
- edit_view->SetUserText(text);
+ edit_view->SetUserText(UTF16ToWideHack(text));
reply.SendSuccess(NULL);
}
@@ -2478,12 +2478,12 @@ void AutomationProvider::ImportSettings(Browser* browser,
string_to_import_item["HOME_PAGE"] = importer::HOME_PAGE;
string_to_import_item["ALL"] = importer::ALL;
- std::wstring browser_name;
+ string16 browser_name;
int import_items = 0;
ListValue* import_items_list = NULL;
bool first_run;
- if (!args->GetString(L"import_from", &browser_name) ||
+ if (!args->GetString("import_from", &browser_name) ||
!args->GetBoolean("first_run", &first_run) ||
!args->GetList("import_items", &import_items_list)) {
AutomationJSONReply(this, reply_message).SendError(
@@ -2510,7 +2510,7 @@ void AutomationProvider::ImportSettings(Browser* browser,
int num_browsers = importer_host->GetAvailableProfileCount();
int i = 0;
for ( ; i < num_browsers; i++) {
- std::wstring name = importer_host->GetSourceProfileNameAt(i);
+ string16 name = WideToUTF16Hack(importer_host->GetSourceProfileNameAt(i));
if (name == browser_name) {
profile_info = importer_host->GetSourceProfileInfoAt(i);
break;
diff --git a/chrome/browser/automation/extension_automation_constants.cc b/chrome/browser/automation/extension_automation_constants.cc
index c513945..c4e6fce 100644
--- a/chrome/browser/automation/extension_automation_constants.cc
+++ b/chrome/browser/automation/extension_automation_constants.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -7,22 +7,22 @@
namespace extension_automation_constants {
const char kAutomationOrigin[] = "__priv_xtapi";
-const wchar_t kAutomationRequestIdKey[] = L"rqid";
+const char kAutomationRequestIdKey[] = "rqid";
-const wchar_t kAutomationHasCallbackKey[] = L"hascb";
-const wchar_t kAutomationErrorKey[] = L"err";
-const wchar_t kAutomationNameKey[] = L"name";
-const wchar_t kAutomationArgsKey[] = L"args";
-const wchar_t kAutomationResponseKey[] = L"res";
+const char kAutomationHasCallbackKey[] = "hascb";
+const char kAutomationErrorKey[] = "err";
+const char kAutomationNameKey[] = "name";
+const char kAutomationArgsKey[] = "args";
+const char kAutomationResponseKey[] = "res";
const char kAutomationRequestTarget[] = "__priv_xtreq";
const char kAutomationResponseTarget[] = "__priv_xtres";
-const wchar_t kAutomationConnectionIdKey[] = L"connid";
-const wchar_t kAutomationMessageDataKey[] = L"data";
-const wchar_t kAutomationExtensionIdKey[] = L"extid";
-const wchar_t kAutomationPortIdKey[] = L"portid";
-const wchar_t kAutomationChannelNameKey[] = L"chname";
-const wchar_t kAutomationTabJsonKey[] = L"tab";
+const char kAutomationConnectionIdKey[] = "connid";
+const char kAutomationMessageDataKey[] = "data";
+const char kAutomationExtensionIdKey[] = "extid";
+const char kAutomationPortIdKey[] = "portid";
+const char kAutomationChannelNameKey[] = "chname";
+const char kAutomationTabJsonKey[] = "tab";
const char kAutomationPortRequestTarget[] = "__priv_prtreq";
const char kAutomationPortResponseTarget[] = "__priv_prtres";
diff --git a/chrome/browser/automation/extension_automation_constants.h b/chrome/browser/automation/extension_automation_constants.h
index 8569922..dea4d2d 100644
--- a/chrome/browser/automation/extension_automation_constants.h
+++ b/chrome/browser/automation/extension_automation_constants.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,26 +13,26 @@ namespace extension_automation_constants {
// All extension automation related messages will have this origin.
extern const char kAutomationOrigin[];
// Key used for all extension automation request types.
-extern const wchar_t kAutomationRequestIdKey[];
+extern const char kAutomationRequestIdKey[];
// Keys used for API communications
-extern const wchar_t kAutomationHasCallbackKey[];
-extern const wchar_t kAutomationErrorKey[]; // not present implies success
-extern const wchar_t kAutomationNameKey[];
-extern const wchar_t kAutomationArgsKey[];
-extern const wchar_t kAutomationResponseKey[];
+extern const char kAutomationHasCallbackKey[];
+extern const char kAutomationErrorKey[]; // not present implies success
+extern const char kAutomationNameKey[];
+extern const char kAutomationArgsKey[];
+extern const char kAutomationResponseKey[];
// All external API requests have this target.
extern const char kAutomationRequestTarget[];
// All API responses should have this target.
extern const char kAutomationResponseTarget[];
// Keys used for port communications
-extern const wchar_t kAutomationConnectionIdKey[];
-extern const wchar_t kAutomationMessageDataKey[];
-extern const wchar_t kAutomationExtensionIdKey[];
-extern const wchar_t kAutomationPortIdKey[];
-extern const wchar_t kAutomationChannelNameKey[];
-extern const wchar_t kAutomationTabJsonKey[];
+extern const char kAutomationConnectionIdKey[];
+extern const char kAutomationMessageDataKey[];
+extern const char kAutomationExtensionIdKey[];
+extern const char kAutomationPortIdKey[];
+extern const char kAutomationChannelNameKey[];
+extern const char kAutomationTabJsonKey[];
// All external port message requests should have this target.
extern const char kAutomationPortRequestTarget[];