summaryrefslogtreecommitdiffstats
path: root/cloud_print/service/win
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2014-08-31 10:43:30 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-31 17:46:18 +0000
commitbeb9fd30c68dd27606de80a2d017cddeeb799c3b (patch)
treef8fb700ce5adba100e5d805f93fe86cb75fa5f5b /cloud_print/service/win
parent4c26e0a5860806411c83d8e5128414221744bcdc (diff)
downloadchromium_src-beb9fd30c68dd27606de80a2d017cddeeb799c3b.zip
chromium_src-beb9fd30c68dd27606de80a2d017cddeeb799c3b.tar.gz
chromium_src-beb9fd30c68dd27606de80a2d017cddeeb799c3b.tar.bz2
Revert of Revert of clang/win: Fix a few warnings in targets not in chromium_builder_tests. (patchset #1 id:1 of https://codereview.chromium.org/519463003/)
Reason for revert: Reland, wasn't the reason for the redness. (https://codereview.chromium.org/521703002/ was.) Original issue's description: > Revert of clang/win: Fix a few warnings in targets not in chromium_builder_tests. (patchset #3 id:40001 of https://codereview.chromium.org/526513002/) > > Reason for revert: > Speculative, might have broken InstallerStateTest.InitializeTwice on XP: http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/32481 > > InstallerStateTest.InitializeTwice (run #1): > [ RUN ] InstallerStateTest.InitializeTwice > c:\b\build\slave\win_builder\build\src\chrome\installer\util\installer_state_unittest.cc(639): error: Value of: wcsstr(installer_state.target_path().value().c_str(), BrowserDistribution::GetSpecificDistribution( BrowserDistribution::CHROME_BINARIES)-> GetInstallSubDir().c_str()) > Actual: false > Expected: true > [ FAILED ] InstallerStateTest.InitializeTwice (219 ms) > > InstallerStateTest.InitializeTwice (run #2): > [ RUN ] InstallerStateTest.InitializeTwice > c:\b\build\slave\win_builder\build\src\chrome\installer\util\installer_state_unittest.cc(639): error: Value of: wcsstr(installer_state.target_path().value().c_str(), BrowserDistribution::GetSpecificDistribution( BrowserDistribution::CHROME_BINARIES)-> GetInstallSubDir().c_str()) > Actual: false > Expected: true > [ FAILED ] InstallerStateTest.InitializeTwice (109 ms) > > > Original issue's description: > > clang/win: Fix a few warnings in targets not in chromium_builder_tests. > > > > Also don't use "default" as a variable name, as it's a keyword. > > Also fix a bug where a wstring was passed to %ls. > > > > No real behavior change. > > > > BUG=82385 > > R=hans@chromium.org > > TBR=cpu, vitalybuka > > > > Committed to pending queue: https://chromium.googlesource.com/chromium/src/+/d7efa09 > > TBR=hans@chromium.org,robertshield@chromium.org,gab@chromium.org,vitalybuka@chromium.org,cpu@chromium.org > NOTREECHECKS=true > NOTRY=true > BUG=82385 > > Committed: https://chromium.googlesource.com/chromium/src/+/dae20dafcfd3ccc439ccc5b3d5e21ad611d13c23 TBR=hans@chromium.org,robertshield@chromium.org,gab@chromium.org,vitalybuka@chromium.org,cpu@chromium.org NOTREECHECKS=true NOTRY=true BUG=82385 Review URL: https://codereview.chromium.org/525013003 Cr-Commit-Position: refs/heads/master@{#292818}
Diffstat (limited to 'cloud_print/service/win')
-rw-r--r--cloud_print/service/win/cloud_print_service.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/cloud_print/service/win/cloud_print_service.cc b/cloud_print/service/win/cloud_print_service.cc
index 6f58095..2e15398 100644
--- a/cloud_print/service/win/cloud_print_service.cc
+++ b/cloud_print/service/win/cloud_print_service.cc
@@ -80,10 +80,11 @@ void InvalidUsage() {
std::cout << "\n";
}
-base::string16 GetOption(int string_id, const base::string16& default,
- bool secure) {
+base::string16 GetOption(int string_id,
+ const base::string16& default_option,
+ bool secure) {
base::string16 prompt_format = cloud_print::LoadLocalString(string_id);
- std::vector<base::string16> substitutions(1, default);
+ std::vector<base::string16> substitutions(1, default_option);
std::cout << ReplaceStringPlaceholders(prompt_format, substitutions, NULL);
base::string16 tmp;
if (secure) {
@@ -99,7 +100,7 @@ base::string16 GetOption(int string_id, const base::string16& default,
std::getline(std::wcin, tmp);
}
if (tmp.empty())
- return default;
+ return default_option;
return tmp;
}