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

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

Issue 1094009: Ensure that data doesn't leak between users on cros chrome crash. (Closed)
Patch Set: Make tests not use OTR Profile Created 10 years, 9 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 | « chrome/browser/process_singleton_linux.cc ('k') | chrome/browser/profile_manager.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) 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 // Get command line. 259 // Get command line.
260 const std::wstring cmd_line = 260 const std::wstring cmd_line =
261 msg.substr(second_null + 1, third_null - second_null); 261 msg.substr(second_null + 1, third_null - second_null);
262 262
263 CommandLine parsed_command_line = CommandLine::FromString(cmd_line); 263 CommandLine parsed_command_line = CommandLine::FromString(cmd_line);
264 PrefService* prefs = g_browser_process->local_state(); 264 PrefService* prefs = g_browser_process->local_state();
265 DCHECK(prefs); 265 DCHECK(prefs);
266 266
267 FilePath user_data_dir; 267 Profile* profile = ProfileManager::GetDefaultProfile();
268 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
269 ProfileManager* profile_manager = g_browser_process->profile_manager();
270 Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
271 if (!profile) { 268 if (!profile) {
272 // We should only be able to get here if the profile already exists and 269 // We should only be able to get here if the profile already exists and
273 // has been created. 270 // has been created.
274 NOTREACHED(); 271 NOTREACHED();
275 return TRUE; 272 return TRUE;
276 } 273 }
277 274
278 // Run the browser startup sequence again, with the command line of the 275 // Run the browser startup sequence again, with the command line of the
279 // signalling process. 276 // signalling process.
280 BrowserInit::ProcessCommandLine(parsed_command_line, cur_dir, false, 277 BrowserInit::ProcessCommandLine(parsed_command_line, cur_dir, false,
281 profile, NULL); 278 profile, NULL);
282 return TRUE; 279 return TRUE;
283 } 280 }
284 return TRUE; 281 return TRUE;
285 } 282 }
286 283
287 LRESULT CALLBACK ProcessSingleton::WndProc(HWND hwnd, UINT message, 284 LRESULT CALLBACK ProcessSingleton::WndProc(HWND hwnd, UINT message,
288 WPARAM wparam, LPARAM lparam) { 285 WPARAM wparam, LPARAM lparam) {
289 switch (message) { 286 switch (message) {
290 case WM_COPYDATA: 287 case WM_COPYDATA:
291 return OnCopyData(reinterpret_cast<HWND>(wparam), 288 return OnCopyData(reinterpret_cast<HWND>(wparam),
292 reinterpret_cast<COPYDATASTRUCT*>(lparam)); 289 reinterpret_cast<COPYDATASTRUCT*>(lparam));
293 default: 290 default:
294 break; 291 break;
295 } 292 }
296 293
297 return ::DefWindowProc(hwnd, message, wparam, lparam); 294 return ::DefWindowProc(hwnd, message, wparam, lparam);
298 } 295 }
OLDNEW
« no previous file with comments | « chrome/browser/process_singleton_linux.cc ('k') | chrome/browser/profile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698