diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 19:35:33 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 19:35:33 +0000 |
commit | 698f7f43984b1acbc74b0a64fd2205a3ff4efe07 (patch) | |
tree | 91f75dcb443d2d2b861998d091f2dda0706b2056 /chrome | |
parent | fca868203103ef3d0accbe6dded134364dc222f3 (diff) | |
download | chromium_src-698f7f43984b1acbc74b0a64fd2205a3ff4efe07.zip chromium_src-698f7f43984b1acbc74b0a64fd2205a3ff4efe07.tar.gz chromium_src-698f7f43984b1acbc74b0a64fd2205a3ff4efe07.tar.bz2 |
Rename GetStringAsUTF16() to GetString() (and overload), etc.
Also do some drive-by wstring/wchar_t -> string/char changes (in addition to the
necessary ones).
BUG=none
TEST=builds and tests pass
Review URL: http://codereview.chromium.org/3091005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54944 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 19 | ||||
-rw-r--r-- | chrome/browser/background_contents_service.cc | 2 | ||||
-rw-r--r-- | chrome/browser/bookmarks/bookmark_codec.cc | 26 | ||||
-rw-r--r-- | chrome/browser/bookmarks/bookmark_codec.h | 24 | ||||
-rw-r--r-- | chrome/browser/dom_ui/net_internals_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_history_api.cc | 3 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_history_api_constants.cc | 38 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_history_api_constants.h | 38 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_omnibox_api.cc | 14 | ||||
-rw-r--r-- | chrome/browser/geolocation/access_token_store.cc | 4 | ||||
-rw-r--r-- | chrome/browser/geolocation/network_location_provider_unittest.cc | 20 | ||||
-rw-r--r-- | chrome/browser/geolocation/network_location_request.cc | 72 | ||||
-rw-r--r-- | chrome/browser/plugin_updater.cc | 2 |
13 files changed, 132 insertions, 132 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index e65d166..8f3e136 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -2555,13 +2555,13 @@ webkit_glue::PasswordForm GetPasswordFormFromDict( // We don't care if any of these fail - they are either optional or checked // before this function is called. password_dict.GetString("signon_realm", &signon_realm); - password_dict.GetStringAsUTF16("username_value", &username_value); - password_dict.GetStringAsUTF16("password_value", &password_value); - password_dict.GetStringAsUTF16("origin_url", &origin_url_text); - password_dict.GetStringAsUTF16("username_element", &username_element); - password_dict.GetStringAsUTF16("password_element", &password_element); - password_dict.GetStringAsUTF16("submit_element", &submit_element); - password_dict.GetStringAsUTF16("action_target", &action_target_text); + password_dict.GetString("username_value", &username_value); + password_dict.GetString("password_value", &password_value); + password_dict.GetString("origin_url", &origin_url_text); + password_dict.GetString("username_element", &username_element); + password_dict.GetString("password_element", &password_element); + password_dict.GetString("submit_element", &submit_element); + password_dict.GetString("action_target", &action_target_text); password_dict.GetBoolean("blacklist", &blacklist); GURL origin_gurl(origin_url_text); @@ -3130,7 +3130,8 @@ std::vector<AutoFillProfile> AutomationProvider::GetAutoFillProfilesFromList( autofill_type_to_string.begin(); type_it != autofill_type_to_string.end(); ++type_it) { if (profile_info->HasKey(type_it->second)) { - if (profile_info->GetStringAsUTF16(type_it->second, ¤t_value)) { + if (profile_info->GetString(WideToUTF8(type_it->second), + ¤t_value)) { profile.SetInfo(AutoFillType(type_it->first), current_value); } else { *error_message= "All values must be strings"; @@ -3164,7 +3165,7 @@ std::vector<CreditCard> AutomationProvider::GetCreditCardsFromList( credit_card_type_to_string.begin(); type_it != credit_card_type_to_string.end(); ++type_it) { if (card_info->HasKey(type_it->second)) { - if (card_info->GetStringAsUTF16(type_it->second, ¤t_value)) { + if (card_info->GetString(WideToUTF8(type_it->second), ¤t_value)) { card.SetInfo(AutoFillType(type_it->first), current_value); } else { *error_message= "All values must be strings"; diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc index 927d169..8e322d4 100644 --- a/chrome/browser/background_contents_service.cc +++ b/chrome/browser/background_contents_service.cc @@ -147,7 +147,7 @@ void BackgroundContentsService::LoadBackgroundContentsFromPrefs( string16 frame_name; std::string url; dict->GetString(kUrlKey, &url); - dict->GetStringAsUTF16(kFrameNameKey, &frame_name); + dict->GetString(kFrameNameKey, &frame_name); CreateBackgroundContents(profile, GURL(url), frame_name, diff --git a/chrome/browser/bookmarks/bookmark_codec.cc b/chrome/browser/bookmarks/bookmark_codec.cc index ad5c239..6edbadf 100644 --- a/chrome/browser/bookmarks/bookmark_codec.cc +++ b/chrome/browser/bookmarks/bookmark_codec.cc @@ -16,18 +16,18 @@ using base::Time; -const wchar_t* BookmarkCodec::kRootsKey = L"roots"; -const wchar_t* BookmarkCodec::kRootFolderNameKey = L"bookmark_bar"; -const wchar_t* BookmarkCodec::kOtherBookmarkFolderNameKey = L"other"; -const wchar_t* BookmarkCodec::kVersionKey = L"version"; -const wchar_t* BookmarkCodec::kChecksumKey = L"checksum"; -const wchar_t* BookmarkCodec::kIdKey = L"id"; -const wchar_t* BookmarkCodec::kTypeKey = L"type"; -const wchar_t* BookmarkCodec::kNameKey = L"name"; -const wchar_t* BookmarkCodec::kDateAddedKey = L"date_added"; -const wchar_t* BookmarkCodec::kURLKey = L"url"; -const wchar_t* BookmarkCodec::kDateModifiedKey = L"date_modified"; -const wchar_t* BookmarkCodec::kChildrenKey = L"children"; +const char* BookmarkCodec::kRootsKey = "roots"; +const char* BookmarkCodec::kRootFolderNameKey = "bookmark_bar"; +const char* BookmarkCodec::kOtherBookmarkFolderNameKey = "other"; +const char* BookmarkCodec::kVersionKey = "version"; +const char* BookmarkCodec::kChecksumKey = "checksum"; +const char* BookmarkCodec::kIdKey = "id"; +const char* BookmarkCodec::kTypeKey = "type"; +const char* BookmarkCodec::kNameKey = "name"; +const char* BookmarkCodec::kDateAddedKey = "date_added"; +const char* BookmarkCodec::kURLKey = "url"; +const char* BookmarkCodec::kDateModifiedKey = "date_modified"; +const char* BookmarkCodec::kChildrenKey = "children"; const char* BookmarkCodec::kTypeURL = "url"; const char* BookmarkCodec::kTypeFolder = "folder"; @@ -204,7 +204,7 @@ bool BookmarkCodec::DecodeNode(const DictionaryValue& value, maximum_id_ = std::max(maximum_id_, id); string16 title; - value.GetStringAsUTF16(kNameKey, &title); + value.GetString(kNameKey, &title); std::string date_added_string; if (!value.GetString(kDateAddedKey, &date_added_string)) diff --git a/chrome/browser/bookmarks/bookmark_codec.h b/chrome/browser/bookmarks/bookmark_codec.h index b9e0d79..3f1dd82 100644 --- a/chrome/browser/bookmarks/bookmark_codec.h +++ b/chrome/browser/bookmarks/bookmark_codec.h @@ -73,18 +73,18 @@ class BookmarkCodec { bool ids_reassigned() const { return ids_reassigned_; } // Names of the various keys written to the Value. - static const wchar_t* kRootsKey; - static const wchar_t* kRootFolderNameKey; - static const wchar_t* kOtherBookmarkFolderNameKey; - static const wchar_t* kVersionKey; - static const wchar_t* kChecksumKey; - static const wchar_t* kIdKey; - static const wchar_t* kTypeKey; - static const wchar_t* kNameKey; - static const wchar_t* kDateAddedKey; - static const wchar_t* kURLKey; - static const wchar_t* kDateModifiedKey; - static const wchar_t* kChildrenKey; + static const char* kRootsKey; + static const char* kRootFolderNameKey; + static const char* kOtherBookmarkFolderNameKey; + static const char* kVersionKey; + static const char* kChecksumKey; + static const char* kIdKey; + static const char* kTypeKey; + static const char* kNameKey; + static const char* kDateAddedKey; + static const char* kURLKey; + static const char* kDateModifiedKey; + static const char* kChildrenKey; // Possible values for kTypeKey. static const char* kTypeURL; diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc index ff0af62..aa5343e 100644 --- a/chrome/browser/dom_ui/net_internals_ui.cc +++ b/chrome/browser/dom_ui/net_internals_ui.cc @@ -755,7 +755,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnStartConnectionTests( string16 url_str; if (value && value->GetType() == Value::TYPE_LIST) { const ListValue* list = static_cast<const ListValue*>(value); - list->GetStringAsUTF16(0, &url_str); + list->GetString(0, &url_str); } // Try to fix-up the user provided URL into something valid. diff --git a/chrome/browser/extensions/extension_history_api.cc b/chrome/browser/extensions/extension_history_api.cc index 6261a4b..95d3acb 100644 --- a/chrome/browser/extensions/extension_history_api.cc +++ b/chrome/browser/extensions/extension_history_api.cc @@ -248,8 +248,7 @@ bool SearchHistoryFunction::RunAsyncImpl() { // Initialize the HistoryQuery string16 search_text; - EXTENSION_FUNCTION_VALIDATE(json->GetStringAsUTF16(keys::kTextKey, - &search_text)); + EXTENSION_FUNCTION_VALIDATE(json->GetString(keys::kTextKey, &search_text)); history::QueryOptions options; options.SetRecentDayRange(1); diff --git a/chrome/browser/extensions/extension_history_api_constants.cc b/chrome/browser/extensions/extension_history_api_constants.cc index 927f76e..b04b7eb 100644 --- a/chrome/browser/extensions/extension_history_api_constants.cc +++ b/chrome/browser/extensions/extension_history_api_constants.cc @@ -6,25 +6,25 @@ namespace extension_history_api_constants { -const wchar_t kAllHistoryKey[] = L"allHistory"; -const wchar_t kEndTimeKey[] = L"endTime"; -const wchar_t kFavIconUrlKey[] = L"favIconUrl"; -const wchar_t kIdKey[] = L"id"; -const wchar_t kLastVisitdKey[] = L"lastVisitTime"; -const wchar_t kMaxResultsKey[] = L"maxResults"; -const wchar_t kNewKey[] = L"new"; -const wchar_t kReferringVisitId[] = L"referringVisitId"; -const wchar_t kRemovedKey[] = L"removed"; -const wchar_t kStartTimeKey[] = L"startTime"; -const wchar_t kTextKey[] = L"text"; -const wchar_t kTitleKey[] = L"title"; -const wchar_t kTypedCountKey[] = L"typedCount"; -const wchar_t kVisitCountKey[] = L"visitCount"; -const wchar_t kTransition[] = L"transition"; -const wchar_t kUrlKey[] = L"url"; -const wchar_t kUrlsKey[] = L"urls"; -const wchar_t kVisitId[] = L"visitId"; -const wchar_t kVisitTime[] = L"visitTime"; +const char kAllHistoryKey[] = "allHistory"; +const char kEndTimeKey[] = "endTime"; +const char kFavIconUrlKey[] = "favIconUrl"; +const char kIdKey[] = "id"; +const char kLastVisitdKey[] = "lastVisitTime"; +const char kMaxResultsKey[] = "maxResults"; +const char kNewKey[] = "new"; +const char kReferringVisitId[] = "referringVisitId"; +const char kRemovedKey[] = "removed"; +const char kStartTimeKey[] = "startTime"; +const char kTextKey[] = "text"; +const char kTitleKey[] = "title"; +const char kTypedCountKey[] = "typedCount"; +const char kVisitCountKey[] = "visitCount"; +const char kTransition[] = "transition"; +const char kUrlKey[] = "url"; +const char kUrlsKey[] = "urls"; +const char kVisitId[] = "visitId"; +const char kVisitTime[] = "visitTime"; const char kOnVisited[] = "history.onVisited"; const char kOnVisitRemoved[] = "history.onVisitRemoved"; diff --git a/chrome/browser/extensions/extension_history_api_constants.h b/chrome/browser/extensions/extension_history_api_constants.h index 442b7e7..6417b9e 100644 --- a/chrome/browser/extensions/extension_history_api_constants.h +++ b/chrome/browser/extensions/extension_history_api_constants.h @@ -11,25 +11,25 @@ namespace extension_history_api_constants { // Keys. -extern const wchar_t kAllHistoryKey[]; -extern const wchar_t kEndTimeKey[]; -extern const wchar_t kFavIconUrlKey[]; -extern const wchar_t kIdKey[]; -extern const wchar_t kLastVisitdKey[]; -extern const wchar_t kMaxResultsKey[]; -extern const wchar_t kNewKey[]; -extern const wchar_t kReferringVisitId[]; -extern const wchar_t kRemovedKey[]; -extern const wchar_t kStartTimeKey[]; -extern const wchar_t kTextKey[]; -extern const wchar_t kTitleKey[]; -extern const wchar_t kTypedCountKey[]; -extern const wchar_t kVisitCountKey[]; -extern const wchar_t kTransition[]; -extern const wchar_t kUrlKey[]; -extern const wchar_t kUrlsKey[]; -extern const wchar_t kVisitId[]; -extern const wchar_t kVisitTime[]; +extern const char kAllHistoryKey[]; +extern const char kEndTimeKey[]; +extern const char kFavIconUrlKey[]; +extern const char kIdKey[]; +extern const char kLastVisitdKey[]; +extern const char kMaxResultsKey[]; +extern const char kNewKey[]; +extern const char kReferringVisitId[]; +extern const char kRemovedKey[]; +extern const char kStartTimeKey[]; +extern const char kTextKey[]; +extern const char kTitleKey[]; +extern const char kTypedCountKey[]; +extern const char kVisitCountKey[]; +extern const char kTransition[]; +extern const char kUrlKey[]; +extern const char kUrlsKey[]; +extern const char kVisitId[]; +extern const char kVisitTime[]; // Events. extern const char kOnVisited[]; diff --git a/chrome/browser/extensions/extension_omnibox_api.cc b/chrome/browser/extensions/extension_omnibox_api.cc index c4845a6..89ed86c 100644 --- a/chrome/browser/extensions/extension_omnibox_api.cc +++ b/chrome/browser/extensions/extension_omnibox_api.cc @@ -25,11 +25,11 @@ const char kDescriptionStylesLengthError[] = "Suggestion descriptionStyles contains an offset longer than the" " description text"; -const wchar_t kSuggestionContent[] = L"content"; -const wchar_t kSuggestionDescription[] = L"description"; -const wchar_t kSuggestionDescriptionStyles[] = L"descriptionStyles"; -const wchar_t kDescriptionStylesType[] = L"type"; -const wchar_t kDescriptionStylesOffset[] = L"offset"; +const char kSuggestionContent[] = "content"; +const char kSuggestionDescription[] = "description"; +const char kSuggestionDescriptionStyles[] = "descriptionStyles"; +const char kDescriptionStylesType[] = "type"; +const char kDescriptionStylesOffset[] = "offset"; }; // namespace // static @@ -101,9 +101,9 @@ bool OmniboxSendSuggestionsFunction::RunImpl() { DictionaryValue* suggestion_value; EXTENSION_FUNCTION_VALIDATE(suggestions_value->GetDictionary( i, &suggestion_value)); - EXTENSION_FUNCTION_VALIDATE(suggestion_value->GetStringAsUTF16( + EXTENSION_FUNCTION_VALIDATE(suggestion_value->GetString( kSuggestionContent, &suggestion.content)); - EXTENSION_FUNCTION_VALIDATE(suggestion_value->GetStringAsUTF16( + EXTENSION_FUNCTION_VALIDATE(suggestion_value->GetString( kSuggestionDescription, &suggestion.description)); if (suggestion_value->HasKey(kSuggestionDescriptionStyles)) { diff --git a/chrome/browser/geolocation/access_token_store.cc b/chrome/browser/geolocation/access_token_store.cc index ec0ca387..7252506 100644 --- a/chrome/browser/geolocation/access_token_store.cc +++ b/chrome/browser/geolocation/access_token_store.cc @@ -50,8 +50,8 @@ void ChromePrefsAccessTokenStore::LoadDictionaryStoreInUIThread( GURL url(*it); if (!url.is_valid()) continue; - token_dictionary->GetStringAsUTF16WithoutPathExpansion( - *it, &access_token_set[url]); + token_dictionary->GetStringWithoutPathExpansion(*it, + &access_token_set[url]); } } request->ForwardResultAsync(MakeTuple(access_token_set)); diff --git a/chrome/browser/geolocation/network_location_provider_unittest.cc b/chrome/browser/geolocation/network_location_provider_unittest.cc index 4e6fdbd..eb3d034 100644 --- a/chrome/browser/geolocation/network_location_provider_unittest.cc +++ b/chrome/browser/geolocation/network_location_provider_unittest.cc @@ -177,35 +177,35 @@ class GeolocationNetworkProviderTest : public testing::Test { EXPECT_EQ(Value::TYPE_DICTIONARY, value->GetType()); DictionaryValue* dictionary = static_cast<DictionaryValue*>(value.get()); std::string attr_value; - EXPECT_TRUE(dictionary->GetString(L"version", &attr_value)); + EXPECT_TRUE(dictionary->GetString("version", &attr_value)); EXPECT_EQ(attr_value, "1.1.0"); - EXPECT_TRUE(dictionary->GetString(L"host", &attr_value)); + EXPECT_TRUE(dictionary->GetString("host", &attr_value)); EXPECT_EQ(attr_value, kTestHost); // Everything else is optional. ListValue* wifi_aps; *max_age_out = kint32min; - if (dictionary->GetList(L"wifi_towers", &wifi_aps)) { + if (dictionary->GetList("wifi_towers", &wifi_aps)) { int i = 0; for (ListValue::const_iterator it = wifi_aps->begin(); it < wifi_aps->end(); ++it, ++i) { EXPECT_EQ(Value::TYPE_DICTIONARY, (*it)->GetType()); DictionaryValue* ap = static_cast<DictionaryValue*>(*it); AccessPointData data; - ap->GetStringAsUTF16(L"mac_address", &data.mac_address); - ap->GetInteger(L"signal_strength", &data.radio_signal_strength); + ap->GetString("mac_address", &data.mac_address); + ap->GetInteger("signal_strength", &data.radio_signal_strength); int age = kint32min; - ap->GetInteger(L"age", &age); + ap->GetInteger("age", &age); if (age > *max_age_out) *max_age_out = age; - ap->GetInteger(L"channel", &data.channel); - ap->GetInteger(L"signal_to_noise", &data.signal_to_noise); - ap->GetStringAsUTF16(L"ssid", &data.ssid); + ap->GetInteger("channel", &data.channel); + ap->GetInteger("signal_to_noise", &data.signal_to_noise); + ap->GetString("ssid", &data.ssid); wifi_data_out->access_point_data.insert(data); } } else { wifi_data_out->access_point_data.clear(); } - if (!dictionary->GetString(L"access_token", access_token_out)) + if (!dictionary->GetString("access_token", access_token_out)) access_token_out->clear(); } diff --git a/chrome/browser/geolocation/network_location_request.cc b/chrome/browser/geolocation/network_location_request.cc index e6423b0..8081568 100644 --- a/chrome/browser/geolocation/network_location_request.cc +++ b/chrome/browser/geolocation/network_location_request.cc @@ -20,13 +20,13 @@ const char kMimeApplicationJson[] = "application/json"; // See http://code.google.com/apis/gears/geolocation_network_protocol.html const char kGeoLocationNetworkProtocolVersion[] = "1.1.0"; -const wchar_t kAccessTokenString[] = L"access_token"; -const wchar_t kLocationString[] = L"location"; -const wchar_t kLatitudeString[] = L"latitude"; -const wchar_t kLongitudeString[] = L"longitude"; -const wchar_t kAltitudeString[] = L"altitude"; -const wchar_t kAccuracyString[] = L"accuracy"; -const wchar_t kAltitudeAccuracyString[] = L"altitude_accuracy"; +const char kAccessTokenString[] = "access_token"; +const char kLocationString[] = "location"; +const char kLatitudeString[] = "latitude"; +const char kLongitudeString[] = "longitude"; +const char kAltitudeString[] = "altitude"; +const char kAccuracyString[] = "accuracy"; +const char kAltitudeAccuracyString[] = "altitude_accuracy"; // Local functions // Creates the request payload to send to the server. @@ -47,11 +47,11 @@ void GetLocationFromResponse(bool http_post_result, const char* RadioTypeToString(RadioType type); // Adds a string if it's valid to the JSON object. -void AddString(const std::wstring& property_name, +void AddString(const std::string& property_name, const string16& value, DictionaryValue* object); // Adds an integer if it's valid to the JSON object. -void AddInteger(const std::wstring& property_name, +void AddInteger(const std::string& property_name, int value, DictionaryValue* object); // Parses the server response body. Returns true if parsing was successful. @@ -150,12 +150,12 @@ void FormRequestBody(const std::string& host_name, COMPILE_ASSERT(sizeof(kGeoLocationNetworkProtocolVersion) > 1, must_include_valid_version); DCHECK(!host_name.empty()); - body_object.SetString(L"version", kGeoLocationNetworkProtocolVersion); - body_object.SetString(L"host", host_name); + body_object.SetString("version", kGeoLocationNetworkProtocolVersion); + body_object.SetString("host", host_name); - AddString(L"access_token", access_token, &body_object); + AddString("access_token", access_token, &body_object); - body_object.SetBoolean(L"request_address", false); + body_object.SetBoolean("request_address", false); int age = kint32min; // Invalid so AddInteger() will ignore. if (!timestamp.is_null()) { @@ -239,7 +239,7 @@ const char* RadioTypeToString(RadioType type) { return "unknown"; } -void AddString(const std::wstring& property_name, +void AddString(const std::string& property_name, const string16& value, DictionaryValue* object) { DCHECK(object); @@ -248,7 +248,7 @@ void AddString(const std::wstring& property_name, } } -void AddInteger(const std::wstring& property_name, +void AddInteger(const std::string& property_name, int value, DictionaryValue* object) { DCHECK(object); @@ -262,7 +262,7 @@ void AddInteger(const std::wstring& property_name, // point numeric values. Note that isIntegral() includes boolean values, which // is not what we want. bool GetAsDouble(const DictionaryValue& object, - const std::wstring& property_name, + const std::string& property_name, double* out) { DCHECK(out); Value* value = NULL; @@ -312,7 +312,7 @@ bool ParseServerResponse(const std::string& response_body, static_cast<DictionaryValue*>(response_value.get()); // Get the access token, if any. - response_object->GetStringAsUTF16(kAccessTokenString, access_token); + response_object->GetString(kAccessTokenString, access_token); // Get the location Value* location_value = NULL; @@ -363,14 +363,14 @@ void AddRadioData(const RadioData& radio_data, DictionaryValue* body_object) { DCHECK(body_object); - AddInteger(L"home_mobile_country_code", radio_data.home_mobile_country_code, + AddInteger("home_mobile_country_code", radio_data.home_mobile_country_code, body_object); - AddInteger(L"home_mobile_network_code", radio_data.home_mobile_network_code, + AddInteger("home_mobile_network_code", radio_data.home_mobile_network_code, body_object); - AddString(L"radio_type", + AddString("radio_type", ASCIIToUTF16(RadioTypeToString(radio_data.radio_type)), body_object); - AddString(L"carrier", radio_data.carrier, body_object); + AddString("carrier", radio_data.carrier, body_object); const int num_cell_towers = static_cast<int>(radio_data.cell_data.size()); if (num_cell_towers == 0) { @@ -379,21 +379,21 @@ void AddRadioData(const RadioData& radio_data, ListValue* cell_towers = new ListValue; for (int i = 0; i < num_cell_towers; ++i) { DictionaryValue* cell_tower = new DictionaryValue; - AddInteger(L"cell_id", radio_data.cell_data[i].cell_id, cell_tower); - AddInteger(L"location_area_code", + AddInteger("cell_id", radio_data.cell_data[i].cell_id, cell_tower); + AddInteger("location_area_code", radio_data.cell_data[i].location_area_code, cell_tower); - AddInteger(L"mobile_country_code", + AddInteger("mobile_country_code", radio_data.cell_data[i].mobile_country_code, cell_tower); - AddInteger(L"mobile_network_code", + AddInteger("mobile_network_code", radio_data.cell_data[i].mobile_network_code, cell_tower); - AddInteger(L"age", age_milliseconds, cell_tower); - AddInteger(L"signal_strength", + AddInteger("age", age_milliseconds, cell_tower); + AddInteger("signal_strength", radio_data.cell_data[i].radio_signal_strength, cell_tower); - AddInteger(L"timing_advance", radio_data.cell_data[i].timing_advance, + AddInteger("timing_advance", radio_data.cell_data[i].timing_advance, cell_tower); cell_towers->Append(cell_tower); } - body_object->Set(L"cell_towers", cell_towers); + body_object->Set("cell_towers", cell_towers); } void AddWifiData(const WifiData& wifi_data, @@ -411,14 +411,14 @@ void AddWifiData(const WifiData& wifi_data, iter != wifi_data.access_point_data.end(); iter++) { DictionaryValue* wifi_tower = new DictionaryValue; - AddString(L"mac_address", iter->mac_address, wifi_tower); - AddInteger(L"signal_strength", iter->radio_signal_strength, wifi_tower); - AddInteger(L"age", age_milliseconds, wifi_tower); - AddInteger(L"channel", iter->channel, wifi_tower); - AddInteger(L"signal_to_noise", iter->signal_to_noise, wifi_tower); - AddString(L"ssid", iter->ssid, wifi_tower); + AddString("mac_address", iter->mac_address, wifi_tower); + AddInteger("signal_strength", iter->radio_signal_strength, wifi_tower); + AddInteger("age", age_milliseconds, wifi_tower); + AddInteger("channel", iter->channel, wifi_tower); + AddInteger("signal_to_noise", iter->signal_to_noise, wifi_tower); + AddString("ssid", iter->ssid, wifi_tower); wifi_towers->Append(wifi_tower); } - body_object->Set(L"wifi_towers", wifi_towers); + body_object->Set("wifi_towers", wifi_towers); } } // namespace diff --git a/chrome/browser/plugin_updater.cc b/chrome/browser/plugin_updater.cc index 3a794e3..6ca9b7e 100644 --- a/chrome/browser/plugin_updater.cc +++ b/chrome/browser/plugin_updater.cc @@ -156,7 +156,7 @@ void DisablePluginGroupsFromPrefs(Profile* profile) { } if (!enabled) NPAPI::PluginList::Singleton()->DisablePlugin(plugin_path); - } else if (!enabled && plugin->GetStringAsUTF16("name", &group_name)) { + } else if (!enabled && plugin->GetString("name", &group_name)) { // Otherwise this is a list of groups. EnablePluginGroup(false, group_name); } |