diff options
author | thakis <thakis@chromium.org> | 2014-08-30 16:43:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-30 23:46:22 +0000 |
commit | 36c364b15726fd8c9dd05ab492ff640bfda861f4 (patch) | |
tree | 5981f11bc463615c13bd5d5e6d7ecb6d67871a53 /cloud_print/service/win | |
parent | 256383aa0d253e3413a295fd376d3b289d236af3 (diff) | |
download | chromium_src-36c364b15726fd8c9dd05ab492ff640bfda861f4.zip chromium_src-36c364b15726fd8c9dd05ab492ff640bfda861f4.tar.gz chromium_src-36c364b15726fd8c9dd05ab492ff640bfda861f4.tar.bz2 |
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
Review URL: https://codereview.chromium.org/519463003
Cr-Commit-Position: refs/heads/master@{#292809}
Diffstat (limited to 'cloud_print/service/win')
-rw-r--r-- | cloud_print/service/win/cloud_print_service.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cloud_print/service/win/cloud_print_service.cc b/cloud_print/service/win/cloud_print_service.cc index 2e15398..6f58095 100644 --- a/cloud_print/service/win/cloud_print_service.cc +++ b/cloud_print/service/win/cloud_print_service.cc @@ -80,11 +80,10 @@ void InvalidUsage() { std::cout << "\n"; } -base::string16 GetOption(int string_id, - const base::string16& default_option, - bool secure) { +base::string16 GetOption(int string_id, const base::string16& default, + bool secure) { base::string16 prompt_format = cloud_print::LoadLocalString(string_id); - std::vector<base::string16> substitutions(1, default_option); + std::vector<base::string16> substitutions(1, default); std::cout << ReplaceStringPlaceholders(prompt_format, substitutions, NULL); base::string16 tmp; if (secure) { @@ -100,7 +99,7 @@ base::string16 GetOption(int string_id, std::getline(std::wcin, tmp); } if (tmp.empty()) - return default_option; + return default; return tmp; } |