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

Side by Side Diff: chrome/browser/printing/cloud_print/cloud_print_setup_source.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/printing/cloud_print/cloud_print_setup_source.h" 5 #include "chrome/browser/printing/cloud_print/cloud_print_setup_source.h"
6 6
7 #include "base/memory/ref_counted_memory.h" 7 #include "base/memory/ref_counted_memory.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Start by setting the per-locale URLs we show on the setup wizard. 80 // Start by setting the per-locale URLs we show on the setup wizard.
81 dict->SetString("invalidpasswordhelpurl", 81 dict->SetString("invalidpasswordhelpurl",
82 GetLocalizedUrl(kInvalidPasswordHelpUrl)); 82 GetLocalizedUrl(kInvalidPasswordHelpUrl));
83 dict->SetString("cannotaccessaccounturl", 83 dict->SetString("cannotaccessaccounturl",
84 GetLocalizedUrl(kCanNotAccessAccountUrl)); 84 GetLocalizedUrl(kCanNotAccessAccountUrl));
85 dict->SetString("createnewaccounturl", 85 dict->SetString("createnewaccounturl",
86 GetLocalizedUrl(kCreateNewAccountUrl)); 86 GetLocalizedUrl(kCreateNewAccountUrl));
87 87
88 // None of the strings used here currently have sync-specific wording in 88 // None of the strings used here currently have sync-specific wording in
89 // them. There is a unit test to catch if that happens. 89 // them. There is a unit test to catch if that happens.
90 dict->SetString("introduction", ""); 90 dict->SetString("introduction", std::string());
91 AddString(dict, "signinprefix", IDS_SYNC_LOGIN_SIGNIN_PREFIX); 91 AddString(dict, "signinprefix", IDS_SYNC_LOGIN_SIGNIN_PREFIX);
92 AddString(dict, "signinsuffix", IDS_SYNC_LOGIN_SIGNIN_SUFFIX); 92 AddString(dict, "signinsuffix", IDS_SYNC_LOGIN_SIGNIN_SUFFIX);
93 AddString(dict, "cannotbeblank", IDS_SYNC_CANNOT_BE_BLANK); 93 AddString(dict, "cannotbeblank", IDS_SYNC_CANNOT_BE_BLANK);
94 AddString(dict, "emaillabel", IDS_SYNC_LOGIN_EMAIL_SAME_LINE); 94 AddString(dict, "emaillabel", IDS_SYNC_LOGIN_EMAIL_SAME_LINE);
95 AddString(dict, "passwordlabel", IDS_SYNC_LOGIN_PASSWORD_SAME_LINE); 95 AddString(dict, "passwordlabel", IDS_SYNC_LOGIN_PASSWORD_SAME_LINE);
96 AddString(dict, "invalidcredentials", IDS_SYNC_INVALID_USER_CREDENTIALS); 96 AddString(dict, "invalidcredentials", IDS_SYNC_INVALID_USER_CREDENTIALS);
97 AddString(dict, "signin", IDS_SYNC_SIGNIN); 97 AddString(dict, "signin", IDS_SYNC_SIGNIN);
98 AddString(dict, "couldnotconnect", IDS_SYNC_LOGIN_COULD_NOT_CONNECT); 98 AddString(dict, "couldnotconnect", IDS_SYNC_LOGIN_COULD_NOT_CONNECT);
99 AddString(dict, "cannotaccessaccount", IDS_SYNC_CANNOT_ACCESS_ACCOUNT); 99 AddString(dict, "cannotaccessaccount", IDS_SYNC_CANNOT_ACCESS_ACCOUNT);
100 AddString(dict, "createaccount", IDS_SYNC_CREATE_ACCOUNT); 100 AddString(dict, "createaccount", IDS_SYNC_CREATE_ACCOUNT);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return false; 138 return false;
139 } 139 }
140 140
141 std::string CloudPrintSetupSource::GetLocalizedUrl( 141 std::string CloudPrintSetupSource::GetLocalizedUrl(
142 const std::string& url) const { 142 const std::string& url) const {
143 GURL original_url(url); 143 GURL original_url(url);
144 DCHECK(original_url.is_valid()); 144 DCHECK(original_url.is_valid());
145 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url); 145 GURL localized_url = google_util::AppendGoogleLocaleParam(original_url);
146 return localized_url.spec(); 146 return localized_url.spec();
147 } 147 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698