OLD | NEW |
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/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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 // We should only be able to get here if the profile already exists and | 278 // We should only be able to get here if the profile already exists and |
279 // has been created. | 279 // has been created. |
280 NOTREACHED(); | 280 NOTREACHED(); |
281 return TRUE; | 281 return TRUE; |
282 } | 282 } |
283 | 283 |
284 // Handle the --uninstall-extension startup action. This needs to done here | 284 // Handle the --uninstall-extension startup action. This needs to done here |
285 // in the process that is running with the target profile, otherwise the | 285 // in the process that is running with the target profile, otherwise the |
286 // uninstall will fail to unload and remove all components. | 286 // uninstall will fail to unload and remove all components. |
287 if (parsed_command_line.HasSwitch(switches::kUninstallExtension)) { | 287 if (parsed_command_line.HasSwitch(switches::kUninstallExtension)) { |
288 extensions_startup::HandleUninstallExtension(parsed_command_line, | 288 ExtensionsStartupUtil ext_startup_util; |
289 profile); | 289 ext_startup_util.UninstallExtension(parsed_command_line, profile); |
290 return TRUE; | 290 return TRUE; |
291 } | 291 } |
292 | 292 |
293 // Run the browser startup sequence again, with the command line of the | 293 // Run the browser startup sequence again, with the command line of the |
294 // signalling process. | 294 // signalling process. |
295 BrowserInit::ProcessCommandLine(parsed_command_line, cur_dir, false, | 295 BrowserInit::ProcessCommandLine(parsed_command_line, cur_dir, false, |
296 profile, NULL); | 296 profile, NULL); |
297 return TRUE; | 297 return TRUE; |
298 } | 298 } |
299 return TRUE; | 299 return TRUE; |
300 } | 300 } |
301 | 301 |
302 LRESULT CALLBACK ProcessSingleton::WndProc(HWND hwnd, UINT message, | 302 LRESULT CALLBACK ProcessSingleton::WndProc(HWND hwnd, UINT message, |
303 WPARAM wparam, LPARAM lparam) { | 303 WPARAM wparam, LPARAM lparam) { |
304 switch (message) { | 304 switch (message) { |
305 case WM_COPYDATA: | 305 case WM_COPYDATA: |
306 return OnCopyData(reinterpret_cast<HWND>(wparam), | 306 return OnCopyData(reinterpret_cast<HWND>(wparam), |
307 reinterpret_cast<COPYDATASTRUCT*>(lparam)); | 307 reinterpret_cast<COPYDATASTRUCT*>(lparam)); |
308 default: | 308 default: |
309 break; | 309 break; |
310 } | 310 } |
311 | 311 |
312 return ::DefWindowProc(hwnd, message, wparam, lparam); | 312 return ::DefWindowProc(hwnd, message, wparam, lparam); |
313 } | 313 } |
OLD | NEW |