| 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 "chrome/app/main_dll_loader_win.h" | 5 #include "chrome/app/main_dll_loader_win.h" |
| 6 | 6 |
| 7 #include <windows.h> // NOLINT | 7 #include <windows.h> // NOLINT |
| 8 #include <shlwapi.h> // NOLINT | 8 #include <shlwapi.h> // NOLINT |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <userenv.h> // NOLINT | 10 #include <userenv.h> // NOLINT |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 void MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded() { | 173 void MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded() { |
| 174 if (!dll_) | 174 if (!dll_) |
| 175 return; | 175 return; |
| 176 | 176 |
| 177 RelaunchChromeBrowserWithNewCommandLineIfNeededFunc relaunch_function = | 177 RelaunchChromeBrowserWithNewCommandLineIfNeededFunc relaunch_function = |
| 178 reinterpret_cast<RelaunchChromeBrowserWithNewCommandLineIfNeededFunc>( | 178 reinterpret_cast<RelaunchChromeBrowserWithNewCommandLineIfNeededFunc>( |
| 179 ::GetProcAddress(dll_, | 179 ::GetProcAddress(dll_, |
| 180 "RelaunchChromeBrowserWithNewCommandLineIfNeeded")); | 180 "RelaunchChromeBrowserWithNewCommandLineIfNeeded")); |
| 181 if (!relaunch_function) { | 181 if (!relaunch_function) { |
| 182 LOG(ERROR) << "Could not find exported function " | 182 LOG(ERROR) << "Could not find exported function " |
| 183 << "RelaunchChromeBrowserWithNewCommandLineIfNeeded"; | 183 << "RelaunchChromeBrowserWithNewCommandLineIfNeeded " |
| 184 << "(" << process_type_ << " process)"; |
| 184 } else { | 185 } else { |
| 185 relaunch_function(); | 186 relaunch_function(); |
| 186 } | 187 } |
| 187 } | 188 } |
| 188 | 189 |
| 189 //============================================================================= | 190 //============================================================================= |
| 190 | 191 |
| 191 class ChromeDllLoader : public MainDllLoader { | 192 class ChromeDllLoader : public MainDllLoader { |
| 192 protected: | 193 protected: |
| 193 // MainDllLoader implementation. | 194 // MainDllLoader implementation. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 247 } |
| 247 }; | 248 }; |
| 248 | 249 |
| 249 MainDllLoader* MakeMainDllLoader() { | 250 MainDllLoader* MakeMainDllLoader() { |
| 250 #if defined(GOOGLE_CHROME_BUILD) | 251 #if defined(GOOGLE_CHROME_BUILD) |
| 251 return new ChromeDllLoader(); | 252 return new ChromeDllLoader(); |
| 252 #else | 253 #else |
| 253 return new ChromiumDllLoader(); | 254 return new ChromiumDllLoader(); |
| 254 #endif | 255 #endif |
| 255 } | 256 } |
| OLD | NEW |