Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Unified Diff: chrome/browser/ui/browser_window_state.cc

Issue 2779893005: Continue to clean c_str() calls. (Closed)
Patch Set: Revert changes in font_service_app.cc Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/browser_window_state.cc
diff --git a/chrome/browser/ui/browser_window_state.cc b/chrome/browser/ui/browser_window_state.cc
index db4308be132bb389c0a47bf9da7a0dbb5b9c83f3..e7eb1923632561cf30d5d02fa0bad2b09843e7b8 100644
--- a/chrome/browser/ui/browser_window_state.cc
+++ b/chrome/browser/ui/browser_window_state.cc
@@ -85,8 +85,8 @@ std::unique_ptr<DictionaryPrefUpdate> GetWindowPlacementDictionaryReadWrite(
PrefService* prefs) {
DCHECK(!window_name.empty());
// A normal DictionaryPrefUpdate will suffice for non-app windows.
- if (prefs->FindPreference(window_name.c_str())) {
- return base::MakeUnique<DictionaryPrefUpdate>(prefs, window_name.c_str());
+ if (prefs->FindPreference(window_name)) {
+ return base::MakeUnique<DictionaryPrefUpdate>(prefs, window_name);
}
return std::unique_ptr<DictionaryPrefUpdate>(
new WindowPlacementPrefUpdate(prefs, window_name));
@@ -96,8 +96,8 @@ const base::DictionaryValue* GetWindowPlacementDictionaryReadOnly(
const std::string& window_name,
PrefService* prefs) {
DCHECK(!window_name.empty());
- if (prefs->FindPreference(window_name.c_str()))
- return prefs->GetDictionary(window_name.c_str());
+ if (prefs->FindPreference(window_name))
+ return prefs->GetDictionary(window_name);
const base::DictionaryValue* app_windows =
prefs->GetDictionary(prefs::kAppWindowPlacement);
« no previous file with comments | « chrome/browser/supervised_user/experimental/safe_search_url_reporter.cc ('k') | chrome/browser/ui/chrome_pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698