| 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/environment.h" | 10 #include "base/environment.h" | 
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 218   if (!dll_) | 218   if (!dll_) | 
| 219     return chrome::RESULT_CODE_MISSING_DATA; | 219     return chrome::RESULT_CODE_MISSING_DATA; | 
| 220 | 220 | 
| 221   scoped_ptr<base::Environment> env(base::Environment::Create()); | 221   scoped_ptr<base::Environment> env(base::Environment::Create()); | 
| 222   env->SetVar(chrome::kChromeVersionEnvVar, base::WideToUTF8(version)); | 222   env->SetVar(chrome::kChromeVersionEnvVar, base::WideToUTF8(version)); | 
| 223 | 223 | 
| 224   OnBeforeLaunch(process_type_, file); | 224   OnBeforeLaunch(process_type_, file); | 
| 225   DLL_MAIN chrome_main = | 225   DLL_MAIN chrome_main = | 
| 226       reinterpret_cast<DLL_MAIN>(::GetProcAddress(dll_, "ChromeMain")); | 226       reinterpret_cast<DLL_MAIN>(::GetProcAddress(dll_, "ChromeMain")); | 
| 227   int rc = chrome_main(instance, &sandbox_info); | 227   int rc = chrome_main(instance, &sandbox_info); | 
| 228   return OnBeforeExit(rc, file); | 228   rc = OnBeforeExit(rc, file); | 
|  | 229   breakpad::ShutdownCrashReporter(); | 
|  | 230   return rc; | 
| 229 } | 231 } | 
| 230 | 232 | 
| 231 void MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded() { | 233 void MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded() { | 
| 232   if (!dll_) | 234   if (!dll_) | 
| 233     return; | 235     return; | 
| 234 | 236 | 
| 235   RelaunchChromeBrowserWithNewCommandLineIfNeededFunc relaunch_function = | 237   RelaunchChromeBrowserWithNewCommandLineIfNeededFunc relaunch_function = | 
| 236       reinterpret_cast<RelaunchChromeBrowserWithNewCommandLineIfNeededFunc>( | 238       reinterpret_cast<RelaunchChromeBrowserWithNewCommandLineIfNeededFunc>( | 
| 237           ::GetProcAddress(dll_, | 239           ::GetProcAddress(dll_, | 
| 238                            "RelaunchChromeBrowserWithNewCommandLineIfNeeded")); | 240                            "RelaunchChromeBrowserWithNewCommandLineIfNeeded")); | 
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 291   } | 293   } | 
| 292 }; | 294 }; | 
| 293 | 295 | 
| 294 MainDllLoader* MakeMainDllLoader() { | 296 MainDllLoader* MakeMainDllLoader() { | 
| 295 #if defined(GOOGLE_CHROME_BUILD) | 297 #if defined(GOOGLE_CHROME_BUILD) | 
| 296   return new ChromeDllLoader(); | 298   return new ChromeDllLoader(); | 
| 297 #else | 299 #else | 
| 298   return new ChromiumDllLoader(); | 300   return new ChromiumDllLoader(); | 
| 299 #endif | 301 #endif | 
| 300 } | 302 } | 
| OLD | NEW | 
|---|