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

Side by Side Diff: chrome/browser/process_singleton_win.cc

Issue 329017: Remove deprecated CommandLine(std::wstring) ctor. (Closed)
Patch Set: Created 11 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/process_singleton.h" 5 #include "chrome/browser/process_singleton.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/win_util.h" 8 #include "app/win_util.h"
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 if (third_null == std::wstring::npos || 224 if (third_null == std::wstring::npos ||
225 third_null == msg.length()) { 225 third_null == msg.length()) {
226 LOG(WARNING) << "Invalid format for start command, we need a string in 4 " 226 LOG(WARNING) << "Invalid format for start command, we need a string in 4 "
227 "parts separated by NULLs"; 227 "parts separated by NULLs";
228 } 228 }
229 229
230 // Get command line. 230 // Get command line.
231 const std::wstring cmd_line = 231 const std::wstring cmd_line =
232 msg.substr(second_null + 1, third_null - second_null); 232 msg.substr(second_null + 1, third_null - second_null);
233 233
234 CommandLine parsed_command_line(L""); 234 CommandLine parsed_command_line;
235 parsed_command_line.ParseFromString(cmd_line); 235 parsed_command_line.ParseFromString(cmd_line);
236 PrefService* prefs = g_browser_process->local_state(); 236 PrefService* prefs = g_browser_process->local_state();
237 DCHECK(prefs); 237 DCHECK(prefs);
238 238
239 FilePath user_data_dir; 239 FilePath user_data_dir;
240 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 240 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
241 ProfileManager* profile_manager = g_browser_process->profile_manager(); 241 ProfileManager* profile_manager = g_browser_process->profile_manager();
242 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir); 242 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
243 if (!profile) { 243 if (!profile) {
244 // We should only be able to get here if the profile already exists and 244 // We should only be able to get here if the profile already exists and
(...skipping 16 matching lines...) Expand all
261 switch (message) { 261 switch (message) {
262 case WM_COPYDATA: 262 case WM_COPYDATA:
263 return OnCopyData(reinterpret_cast<HWND>(wparam), 263 return OnCopyData(reinterpret_cast<HWND>(wparam),
264 reinterpret_cast<COPYDATASTRUCT*>(lparam)); 264 reinterpret_cast<COPYDATASTRUCT*>(lparam));
265 default: 265 default:
266 break; 266 break;
267 } 267 }
268 268
269 return ::DefWindowProc(hwnd, message, wparam, lparam); 269 return ::DefWindowProc(hwnd, message, wparam, lparam);
270 } 270 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_url_request_context_unittest.cc ('k') | chrome/browser/shell_integration_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698