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

Side by Side Diff: win8/test/test_registrar.cc

Issue 119733002: Add base:: to string16s in win8/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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
« no previous file with comments | « win8/test/open_with_dialog_controller.cc ('k') | win8/test/ui_automation_client.h » ('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 // Win8 default browser registration utility. 5 // Win8 default browser registration utility.
6 // 6 //
7 // This tool can register and unregister a given exe as a potential default 7 // This tool can register and unregister a given exe as a potential default
8 // metro browser on Win8. It does not make the exe become THE default browser, 8 // metro browser on Win8. It does not make the exe become THE default browser,
9 // for a mechnism to do this please see open_with_dialog_controller.h. 9 // for a mechnism to do this please see open_with_dialog_controller.h.
10 // 10 //
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 registrar->AddReplacement(L"APP_USER_MODEL_ID", 85 registrar->AddReplacement(L"APP_USER_MODEL_ID",
86 command_line.GetSwitchValueNative( 86 command_line.GetSwitchValueNative(
87 win8::test::kTestAppUserModelId).c_str()); 87 win8::test::kTestAppUserModelId).c_str());
88 registrar->AddReplacement(L"EXE_NAME", 88 registrar->AddReplacement(L"EXE_NAME",
89 command_line.GetSwitchValueNative( 89 command_line.GetSwitchValueNative(
90 win8::test::kTestExeName).c_str()); 90 win8::test::kTestExeName).c_str());
91 registrar->AddReplacement(L"PROG_ID", 91 registrar->AddReplacement(L"PROG_ID",
92 command_line.GetSwitchValueNative( 92 command_line.GetSwitchValueNative(
93 win8::test::kTestProgId).c_str()); 93 win8::test::kTestProgId).c_str());
94 94
95 string16 exe_path( 95 base::string16 exe_path(
96 command_line.GetSwitchValueNative(win8::test::kTestExePath)); 96 command_line.GetSwitchValueNative(win8::test::kTestExePath));
97 97
98 string16 exe_open_command(base::StringPrintf(L"\"%ls\" -- %%*", 98 base::string16 exe_open_command(
99 exe_path.c_str())); 99 base::StringPrintf(L"\"%ls\" -- %%*", exe_path.c_str()));
100 registrar->AddReplacement(L"EXE_OPEN_COMMAND", exe_open_command.c_str()); 100 registrar->AddReplacement(L"EXE_OPEN_COMMAND", exe_open_command.c_str());
101 101
102 string16 exe_icon(base::StringPrintf(L"%ls,0", exe_path.c_str())); 102 base::string16 exe_icon(base::StringPrintf(L"%ls,0", exe_path.c_str()));
103 registrar->AddReplacement(L"EXE_ICON", exe_icon.c_str()); 103 registrar->AddReplacement(L"EXE_ICON", exe_icon.c_str());
104 104
105 string16 prog_id_open_command(base::StringPrintf(L"\"%ls\" -- \"%%1\"", 105 base::string16 prog_id_open_command(
106 exe_path.c_str())); 106 base::StringPrintf(L"\"%ls\" -- \"%%1\"", exe_path.c_str()));
107 registrar->AddReplacement(L"PROG_ID_OPEN_COMMAND", 107 registrar->AddReplacement(L"PROG_ID_OPEN_COMMAND",
108 prog_id_open_command.c_str()); 108 prog_id_open_command.c_str());
109 109
110 ATLASSERT(SUCCEEDED(hr)); 110 ATLASSERT(SUCCEEDED(hr));
111 return hr; 111 return hr;
112 } 112 }
113 }; 113 };
114 114
115 TestDelegateExecuteModule _AtlModule; 115 TestDelegateExecuteModule _AtlModule;
116 116
(...skipping 15 matching lines...) Expand all
132 CommandLine::Init(0, NULL); 132 CommandLine::Init(0, NULL);
133 InitializeCommandLineDefaultValues(); 133 InitializeCommandLineDefaultValues();
134 134
135 HRESULT ret_code = _AtlModule.WinMain(nShowCmd); 135 HRESULT ret_code = _AtlModule.WinMain(nShowCmd);
136 136
137 return ret_code; 137 return ret_code;
138 } 138 }
139 139
140 OBJECT_ENTRY_AUTO(__uuidof(TestDefaultBrowserRegistrar), 140 OBJECT_ENTRY_AUTO(__uuidof(TestDefaultBrowserRegistrar),
141 TestDefaultBrowserRegistrar); 141 TestDefaultBrowserRegistrar);
OLDNEW
« no previous file with comments | « win8/test/open_with_dialog_controller.cc ('k') | win8/test/ui_automation_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698