Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Side by Side Diff: chrome/app/main_dll_loader_win.cc

Issue 2619323003: Remove uses of BrowserDistribution::CHROME_BINARIES in installer_util. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 10 #include <stdint.h>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Loads |module| after setting the CWD to |module|'s directory. Returns a 55 // Loads |module| after setting the CWD to |module|'s directory. Returns a
56 // reference to the loaded module on success, or null on error. 56 // reference to the loaded module on success, or null on error.
57 HMODULE LoadModuleWithDirectory(const base::FilePath& module) { 57 HMODULE LoadModuleWithDirectory(const base::FilePath& module) {
58 ::SetCurrentDirectoryW(module.DirName().value().c_str()); 58 ::SetCurrentDirectoryW(module.DirName().value().c_str());
59 PreReadFile(module); 59 PreReadFile(module);
60 return ::LoadLibraryExW(module.value().c_str(), nullptr, 60 return ::LoadLibraryExW(module.value().c_str(), nullptr,
61 LOAD_WITH_ALTERED_SEARCH_PATH); 61 LOAD_WITH_ALTERED_SEARCH_PATH);
62 } 62 }
63 63
64 void RecordDidRun(const base::FilePath& dll_path) { 64 void RecordDidRun(const base::FilePath& dll_path) {
65 bool system_level = !InstallUtil::IsPerUserInstall(dll_path); 65 GoogleUpdateSettings::UpdateDidRunState(true);
66 GoogleUpdateSettings::UpdateDidRunState(true, system_level);
67 } 66 }
68 67
69 void ClearDidRun(const base::FilePath& dll_path) { 68 void ClearDidRun(const base::FilePath& dll_path) {
70 bool system_level = !InstallUtil::IsPerUserInstall(dll_path); 69 GoogleUpdateSettings::UpdateDidRunState(false);
71 GoogleUpdateSettings::UpdateDidRunState(false, system_level);
72 } 70 }
73 71
74 typedef int (*InitMetro)(); 72 typedef int (*InitMetro)();
75 73
76 bool ProcessTypeUsesMainDll(const std::string& process_type) { 74 bool ProcessTypeUsesMainDll(const std::string& process_type) {
77 return process_type.empty() || process_type == switches::kServiceProcess; 75 return process_type.empty() || process_type == switches::kServiceProcess;
78 } 76 }
79 77
80 } // namespace 78 } // namespace
81 79
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 251 }
254 }; 252 };
255 253
256 MainDllLoader* MakeMainDllLoader() { 254 MainDllLoader* MakeMainDllLoader() {
257 #if defined(GOOGLE_CHROME_BUILD) 255 #if defined(GOOGLE_CHROME_BUILD)
258 return new ChromeDllLoader(); 256 return new ChromeDllLoader();
259 #else 257 #else
260 return new ChromiumDllLoader(); 258 return new ChromiumDllLoader();
261 #endif 259 #endif
262 } 260 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google/did_run_updater_win.h » ('j') | chrome/common/channel_info_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698