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

Unified Diff: chrome/app/main_dll_loader_win.cc

Issue 2381543002: Remove RelaunchChromeBrowserWithNewCommandLineIfNeeded log spam (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/main_dll_loader_win.cc
diff --git a/chrome/app/main_dll_loader_win.cc b/chrome/app/main_dll_loader_win.cc
index 35c43d2a86a6c1c333c4db4decdbcc84ce4d6758..f3a2b57a993757a05c6dafd6736e7feaa5e3e2ac 100644
--- a/chrome/app/main_dll_loader_win.cc
+++ b/chrome/app/main_dll_loader_win.cc
@@ -74,6 +74,10 @@ void ClearDidRun(const base::FilePath& dll_path) {
typedef int (*InitMetro)();
+bool ProcessTypeUsesMainDll(const std::string& process_type) {
+ return process_type.empty() || process_type == switches::kServiceProcess;
+}
+
} // namespace
//=============================================================================
@@ -87,7 +91,7 @@ MainDllLoader::~MainDllLoader() {
HMODULE MainDllLoader::Load(base::FilePath* module) {
const base::char16* dll_name = nullptr;
- if (process_type_ == switches::kServiceProcess || process_type_.empty()) {
+ if (ProcessTypeUsesMainDll(process_type_)) {
dll_name = installer::kChromeDll;
} else if (process_type_ == switches::kWatcherProcess) {
dll_name = kChromeWatcherDll;
@@ -181,12 +185,12 @@ void MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded() {
reinterpret_cast<RelaunchChromeBrowserWithNewCommandLineIfNeededFunc>(
::GetProcAddress(dll_,
"RelaunchChromeBrowserWithNewCommandLineIfNeeded"));
- if (!relaunch_function) {
- LOG(ERROR) << "Could not find exported function "
- << "RelaunchChromeBrowserWithNewCommandLineIfNeeded "
- << "(" << process_type_ << " process)";
- } else {
+ if (relaunch_function) {
relaunch_function();
+ } else if (ProcessTypeUsesMainDll(process_type_)) {
+ LOG(DFATAL) << "Could not find exported function "
+ << "RelaunchChromeBrowserWithNewCommandLineIfNeeded "
+ << "(" << process_type_ << " process)";
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698