| 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 <malloc.h> | 6 #include <malloc.h> |
| 7 #include <shellscalingapi.h> | 7 #include <shellscalingapi.h> |
| 8 #include <tchar.h> | 8 #include <tchar.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/at_exit.h" | 12 #include "base/at_exit.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "base/win/windows_version.h" | 17 #include "base/win/windows_version.h" |
| 18 #include "chrome/app/main_dll_loader_win.h" | 18 #include "chrome/app/main_dll_loader_win.h" |
| 19 #include "chrome/browser/chrome_process_finder_win.h" | 19 #include "chrome/browser/chrome_process_finder_win.h" |
| 20 #include "chrome/browser/policy/policy_path_parser.h" | 20 #include "chrome/browser/policy/policy_path_parser.h" |
| 21 #include "chrome/common/chrome_paths_internal.h" | 21 #include "chrome/common/chrome_paths_internal.h" |
| 22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 23 #include "chrome_elf/chrome_elf_main.h" | 23 #include "chrome_elf/chrome_elf_main.h" |
| 24 #include "components/startup_metric_utils/startup_metric_utils.h" | 24 #include "components/startup_metric_utils/browser/startup_metric_utils.h" |
| 25 #include "content/public/common/result_codes.h" | 25 #include "content/public/common/result_codes.h" |
| 26 #include "ui/gfx/win/dpi.h" | 26 #include "ui/gfx/win/dpi.h" |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 // List of switches that it's safe to rendezvous early with. Fast start should | 29 // List of switches that it's safe to rendezvous early with. Fast start should |
| 30 // not be done if a command line contains a switch not in this set. | 30 // not be done if a command line contains a switch not in this set. |
| 31 // Note this is currently stored as a list of two because it's probably faster | 31 // Note this is currently stored as a list of two because it's probably faster |
| 32 // to iterate over this small array than building a map for constant time | 32 // to iterate over this small array than building a map for constant time |
| 33 // lookups. | 33 // lookups. |
| 34 const char* const kFastStartSwitches[] = { | 34 const char* const kFastStartSwitches[] = { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 return 0; | 153 return 0; |
| 154 | 154 |
| 155 // Load and launch the chrome dll. *Everything* happens inside. | 155 // Load and launch the chrome dll. *Everything* happens inside. |
| 156 VLOG(1) << "About to load main DLL."; | 156 VLOG(1) << "About to load main DLL."; |
| 157 MainDllLoader* loader = MakeMainDllLoader(); | 157 MainDllLoader* loader = MakeMainDllLoader(); |
| 158 int rc = loader->Launch(instance); | 158 int rc = loader->Launch(instance); |
| 159 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); | 159 loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded(); |
| 160 delete loader; | 160 delete loader; |
| 161 return rc; | 161 return rc; |
| 162 } | 162 } |
| OLD | NEW |