summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 16:07:35 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 16:07:35 +0000
commit19bcbfa963214916a9cd6958fac9487b48cbd071 (patch)
tree6b2f7c7bd91214f980de7390051036d131cb1e8b /chrome
parent2f19a2efcd04eefd8b5c2da41bf1d0ceff852fb6 (diff)
downloadchromium_src-19bcbfa963214916a9cd6958fac9487b48cbd071.zip
chromium_src-19bcbfa963214916a9cd6958fac9487b48cbd071.tar.gz
chromium_src-19bcbfa963214916a9cd6958fac9487b48cbd071.tar.bz2
Remove (deprecated) wstring version of DictionaryValue::RemoveWithoutPathExpansion().
(And convert the few remaining uses.) BUG=23581 TEST=builds and passes tests Review URL: http://codereview.chromium.org/3163011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/background_contents_service.cc2
-rw-r--r--chrome/browser/geolocation/geolocation_content_settings_map.cc12
-rw-r--r--chrome/browser/history/top_sites.cc8
-rw-r--r--chrome/browser/history/top_sites.h4
4 files changed, 12 insertions, 14 deletions
diff --git a/chrome/browser/background_contents_service.cc b/chrome/browser/background_contents_service.cc
index 8e322d4..f9eb6f2 100644
--- a/chrome/browser/background_contents_service.cc
+++ b/chrome/browser/background_contents_service.cc
@@ -233,7 +233,7 @@ void BackgroundContentsService::UnregisterBackgroundContents(
const string16 appid = GetParentApplicationId(background_contents);
DictionaryValue* pref = prefs_->GetMutableDictionary(
prefs::kRegisteredBackgroundContents);
- pref->RemoveWithoutPathExpansion(UTF16ToWide(appid), NULL);
+ pref->RemoveWithoutPathExpansion(UTF16ToUTF8(appid), NULL);
prefs_->ScheduleSavePersistentPrefs();
}
diff --git a/chrome/browser/geolocation/geolocation_content_settings_map.cc b/chrome/browser/geolocation/geolocation_content_settings_map.cc
index 77fb103..597d408 100644
--- a/chrome/browser/geolocation/geolocation_content_settings_map.cc
+++ b/chrome/browser/geolocation/geolocation_content_settings_map.cc
@@ -129,8 +129,6 @@ void GeolocationContentSettingsMap::SetContentSetting(
GURL embedding_origin(embedding_url.GetOrigin());
DCHECK(requesting_origin.is_valid());
DCHECK(embedding_origin.is_valid() || embedding_url.is_empty());
- std::wstring wide_requesting_origin(UTF8ToWide(requesting_origin.spec()));
- std::wstring wide_embedding_origin(UTF8ToWide(embedding_origin.spec()));
PrefService* prefs = profile_->GetPrefs();
DictionaryValue* all_settings_dictionary = prefs->GetMutableDictionary(
prefs::kGeolocationContentSettings);
@@ -139,24 +137,24 @@ void GeolocationContentSettingsMap::SetContentSetting(
ScopedPrefUpdate update(prefs, prefs::kGeolocationContentSettings);
DictionaryValue* requesting_origin_settings_dictionary = NULL;
all_settings_dictionary->GetDictionaryWithoutPathExpansion(
- wide_requesting_origin, &requesting_origin_settings_dictionary);
+ requesting_origin.spec(), &requesting_origin_settings_dictionary);
if (setting == CONTENT_SETTING_DEFAULT) {
if (requesting_origin_settings_dictionary) {
requesting_origin_settings_dictionary->RemoveWithoutPathExpansion(
- wide_embedding_origin, NULL);
+ embedding_origin.spec(), NULL);
if (requesting_origin_settings_dictionary->empty())
all_settings_dictionary->RemoveWithoutPathExpansion(
- wide_requesting_origin, NULL);
+ requesting_origin.spec(), NULL);
}
} else {
if (!requesting_origin_settings_dictionary) {
requesting_origin_settings_dictionary = new DictionaryValue;
all_settings_dictionary->SetWithoutPathExpansion(
- wide_requesting_origin, requesting_origin_settings_dictionary);
+ requesting_origin.spec(), requesting_origin_settings_dictionary);
}
DCHECK(requesting_origin_settings_dictionary);
requesting_origin_settings_dictionary->SetWithoutPathExpansion(
- wide_embedding_origin, Value::CreateIntegerValue(setting));
+ embedding_origin.spec(), Value::CreateIntegerValue(setting));
}
}
diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc
index 595761d..07c4cf6 100644
--- a/chrome/browser/history/top_sites.cc
+++ b/chrome/browser/history/top_sites.cc
@@ -434,14 +434,14 @@ void TopSites::ApplyBlacklistAndPinnedURLs(const MostVisitedURLList& urls,
}
}
-std::wstring TopSites::GetURLString(const GURL& url) {
+std::string TopSites::GetURLString(const GURL& url) {
lock_.AssertAcquired();
- return ASCIIToWide(GetCanonicalURL(url).spec());
+ return GetCanonicalURL(url).spec();
}
-std::wstring TopSites::GetURLHash(const GURL& url) {
+std::string TopSites::GetURLHash(const GURL& url) {
lock_.AssertAcquired();
- return ASCIIToWide(MD5String(GetCanonicalURL(url).spec()));
+ return MD5String(GetCanonicalURL(url).spec());
}
void TopSites::UpdateMostVisited(MostVisitedURLList most_visited) {
diff --git a/chrome/browser/history/top_sites.h b/chrome/browser/history/top_sites.h
index b460afb..f664a8b 100644
--- a/chrome/browser/history/top_sites.h
+++ b/chrome/browser/history/top_sites.h
@@ -286,10 +286,10 @@ class TopSites :
MostVisitedURLList* out);
// Converts a url into a canonical string representation.
- std::wstring GetURLString(const GURL& url);
+ std::string GetURLString(const GURL& url);
// Returns an MD5 hash of the URL. Hashing is required for blacklisted URLs.
- std::wstring GetURLHash(const GURL& url);
+ std::string GetURLHash(const GURL& url);
Profile* profile_;
// A mockup to use for testing. If NULL, use the real HistoryService