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

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

Issue 3012021: CommandLine: add a CopySwitchesFrom() for copying from another CommandLine (Closed)
Patch Set: minor cleanups Created 10 years, 4 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/profile_import_process_host.h" 5 #include "chrome/browser/profile_import_process_host.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 FilePath exe_path = GetProfileImportProcessCmd(); 81 FilePath exe_path = GetProfileImportProcessCmd();
82 if (exe_path.empty()) { 82 if (exe_path.empty()) {
83 NOTREACHED() << "Unable to get profile import process binary name."; 83 NOTREACHED() << "Unable to get profile import process binary name.";
84 return false; 84 return false;
85 } 85 }
86 86
87 CommandLine* cmd_line = new CommandLine(exe_path); 87 CommandLine* cmd_line = new CommandLine(exe_path);
88 cmd_line->AppendSwitchWithValue(switches::kProcessType, 88 cmd_line->AppendSwitchWithValue(switches::kProcessType,
89 switches::kProfileImportProcess); 89 switches::kProfileImportProcess);
90 cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, 90 cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
91 ASCIIToWide(channel_id()));
92 91
93 SetCrashReporterCommandLine(cmd_line); 92 SetCrashReporterCommandLine(cmd_line);
94 93
95 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 94 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
96 if (browser_command_line.HasSwitch(switches::kChromeFrame)) 95 if (browser_command_line.HasSwitch(switches::kChromeFrame))
97 cmd_line->AppendSwitch(switches::kChromeFrame); 96 cmd_line->AppendSwitch(switches::kChromeFrame);
98 97
99 #if defined(OS_MACOSX) 98 #if defined(OS_MACOSX)
100 base::environment_vector env; 99 base::environment_vector env;
101 std::string dylib_path = GetFirefoxDylibPath().value(); 100 std::string dylib_path = GetFirefoxDylibPath().value();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportStart, 159 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportStart,
161 ImportProcessClient::OnFavIconsImportStart) 160 ImportProcessClient::OnFavIconsImportStart)
162 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup, 161 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup,
163 ImportProcessClient::OnFavIconsImportGroup) 162 ImportProcessClient::OnFavIconsImportGroup)
164 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyPasswordFormReady, 163 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyPasswordFormReady,
165 ImportProcessClient::OnPasswordFormImportReady) 164 ImportProcessClient::OnPasswordFormImportReady)
166 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyKeywordsReady, 165 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyKeywordsReady,
167 ImportProcessClient::OnKeywordsImportReady) 166 ImportProcessClient::OnKeywordsImportReady)
168 IPC_END_MESSAGE_MAP_EX() 167 IPC_END_MESSAGE_MAP_EX()
169 } 168 }
OLDNEW
« no previous file with comments | « chrome/browser/process_singleton_uitest.cc ('k') | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698