OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 5 #include <windows.h> |
6 #include <tchar.h> | 6 #include <tchar.h> |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "chrome/app/chrome_breakpad_client.h" | 14 #include "chrome/app/chrome_breakpad_client.h" |
15 #include "chrome/app/client_util.h" | 15 #include "chrome/app/client_util.h" |
16 #include "chrome/app/metro_driver_win.h" | 16 #include "chrome/app/metro_driver_win.h" |
17 #include "chrome/browser/chrome_process_finder_win.h" | 17 #include "chrome/browser/chrome_process_finder_win.h" |
18 #include "chrome/browser/policy/policy_path_parser.h" | 18 #include "chrome/browser/policy/policy_path_parser.h" |
19 #include "chrome/common/chrome_paths_internal.h" | 19 #include "chrome/common/chrome_paths_internal.h" |
20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
21 #include "components/breakpad/breakpad_client.h" | 21 #include "components/breakpad/app/breakpad_client.h" |
22 #include "components/breakpad/breakpad_win.h" | 22 #include "components/breakpad/app/breakpad_win.h" |
23 #include "content/public/app/startup_helper_win.h" | 23 #include "content/public/app/startup_helper_win.h" |
24 #include "content/public/common/result_codes.h" | 24 #include "content/public/common/result_codes.h" |
25 #include "sandbox/win/src/sandbox_factory.h" | 25 #include "sandbox/win/src/sandbox_factory.h" |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky | 29 base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky |
30 g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER; | 30 g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER; |
31 | 31 |
32 int RunChrome(HINSTANCE instance) { | 32 int RunChrome(HINSTANCE instance) { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 if (AttemptFastNotify(*CommandLine::ForCurrentProcess())) | 108 if (AttemptFastNotify(*CommandLine::ForCurrentProcess())) |
109 return 0; | 109 return 0; |
110 | 110 |
111 MetroDriver metro_driver; | 111 MetroDriver metro_driver; |
112 if (metro_driver.in_metro_mode()) | 112 if (metro_driver.in_metro_mode()) |
113 return metro_driver.RunInMetro(instance, &RunChrome); | 113 return metro_driver.RunInMetro(instance, &RunChrome); |
114 // Not in metro mode, proceed as normal. | 114 // Not in metro mode, proceed as normal. |
115 return RunChrome(instance); | 115 return RunChrome(instance); |
116 } | 116 } |
OLD | NEW |