| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <shlwapi.h> | 6 #include <shlwapi.h> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 } | 153 } |
| 154 | 154 |
| 155 DCHECK(dll); | 155 DCHECK(dll); |
| 156 return dll; | 156 return dll; |
| 157 } | 157 } |
| 158 | 158 |
| 159 // Launching is a matter of loading the right dll, setting the CHROME_VERSION | 159 // Launching is a matter of loading the right dll, setting the CHROME_VERSION |
| 160 // environment variable and just calling the entry point. Derived classes can | 160 // environment variable and just calling the entry point. Derived classes can |
| 161 // add custom code in the OnBeforeLaunch callback. | 161 // add custom code in the OnBeforeLaunch callback. |
| 162 int MainDllLoader::Launch(HINSTANCE instance) { | 162 int MainDllLoader::Launch(HINSTANCE instance) { |
| 163 const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); | 163 const base::CommandLine& cmd_line = *base::CommandLine::ForCurrentProcess(); |
| 164 process_type_ = cmd_line.GetSwitchValueASCII(switches::kProcessType); | 164 process_type_ = cmd_line.GetSwitchValueASCII(switches::kProcessType); |
| 165 | 165 |
| 166 base::string16 version; | 166 base::string16 version; |
| 167 base::FilePath file; | 167 base::FilePath file; |
| 168 | 168 |
| 169 if (metro_mode_) { | 169 if (metro_mode_) { |
| 170 HMODULE metro_dll = Load(&version, &file); | 170 HMODULE metro_dll = Load(&version, &file); |
| 171 if (!metro_dll) | 171 if (!metro_dll) |
| 172 return chrome::RESULT_CODE_MISSING_DATA; | 172 return chrome::RESULT_CODE_MISSING_DATA; |
| 173 | 173 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 286 } |
| 287 }; | 287 }; |
| 288 | 288 |
| 289 MainDllLoader* MakeMainDllLoader() { | 289 MainDllLoader* MakeMainDllLoader() { |
| 290 #if defined(GOOGLE_CHROME_BUILD) | 290 #if defined(GOOGLE_CHROME_BUILD) |
| 291 return new ChromeDllLoader(); | 291 return new ChromeDllLoader(); |
| 292 #else | 292 #else |
| 293 return new ChromiumDllLoader(); | 293 return new ChromiumDllLoader(); |
| 294 #endif | 294 #endif |
| 295 } | 295 } |
| OLD | NEW |