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

Side by Side Diff: tools/set_default_handler/set_default_handler_main.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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
« no previous file with comments | « sql/recovery.cc ('k') | ui/app_list/search/history.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // Makes a given program ("Google Chrome" by default) the default handler for 5 // Makes a given program ("Google Chrome" by default) the default handler for
6 // some URL protocol ("http" by default) on Windows 8. These defaults can be 6 // some URL protocol ("http" by default) on Windows 8. These defaults can be
7 // overridden via the --program and --protocol command line switches. 7 // overridden via the --program and --protocol command line switches.
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 std::vector<base::string16> choices; 50 std::vector<base::string16> choices;
51 HRESULT result = S_OK; 51 HRESULT result = S_OK;
52 win8::OpenWithDialogController controller; 52 win8::OpenWithDialogController controller;
53 result = controller.RunSynchronously(NULL, protocol, program, &choices); 53 result = controller.RunSynchronously(NULL, protocol, program, &choices);
54 54
55 if (SUCCEEDED(result)) { 55 if (SUCCEEDED(result)) {
56 printf("success\n"); 56 printf("success\n");
57 } else if (!choices.empty()) { 57 } else if (!choices.empty()) {
58 printf("failed to set program. possible choices: %ls\n", 58 printf("failed to set program. possible choices: %ls\n",
59 JoinString(choices, L", ").c_str()); 59 base::JoinString(choices, L", ").c_str());
60 } else { 60 } else {
61 printf("failed with HRESULT: %0x08X\n", result); 61 printf("failed with HRESULT: %0x08X\n", result);
62 } 62 }
63 63
64 return FAILED(result); 64 return FAILED(result);
65 } 65 }
OLDNEW
« no previous file with comments | « sql/recovery.cc ('k') | ui/app_list/search/history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698