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

Side by Side Diff: chrome/utility/chrome_content_utility_client.cc

Issue 2697463002: Convert utility process extension Unpacker IPC to mojo (Closed)
Patch Set: Use MakeUnique when creating the utility mojo client. Created 3 years, 10 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/utility/chrome_content_utility_client.h" 5 #include "chrome/utility/chrome_content_utility_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 #if defined(OS_WIN) 160 #if defined(OS_WIN)
161 handlers_.push_back(new IPCShellHandler()); 161 handlers_.push_back(new IPCShellHandler());
162 #endif 162 #endif
163 } 163 }
164 164
165 ChromeContentUtilityClient::~ChromeContentUtilityClient() = default; 165 ChromeContentUtilityClient::~ChromeContentUtilityClient() = default;
166 166
167 void ChromeContentUtilityClient::UtilityThreadStarted() { 167 void ChromeContentUtilityClient::UtilityThreadStarted() {
168 #if BUILDFLAG(ENABLE_EXTENSIONS) 168 #if BUILDFLAG(ENABLE_EXTENSIONS)
169 extensions::UtilityHandler::UtilityThreadStarted(); 169 extensions::ExtensionsHandler::UtilityThreadStarted();
170 #endif 170 #endif
171 171
172 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 172 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
173 if (command_line->HasSwitch(switches::kUtilityProcessRunningElevated)) 173 if (command_line->HasSwitch(switches::kUtilityProcessRunningElevated))
174 utility_process_running_elevated_ = true; 174 utility_process_running_elevated_ = true;
175 } 175 }
176 176
177 bool ChromeContentUtilityClient::OnMessageReceived( 177 bool ChromeContentUtilityClient::OnMessageReceived(
178 const IPC::Message& message) { 178 const IPC::Message& message) {
179 if (utility_process_running_elevated_) 179 if (utility_process_running_elevated_)
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 safe_browsing::zip_analyzer::Results results; 307 safe_browsing::zip_analyzer::Results results;
308 safe_browsing::dmg::AnalyzeDMGFile( 308 safe_browsing::dmg::AnalyzeDMGFile(
309 IPC::PlatformFileForTransitToFile(dmg_file), &results); 309 IPC::PlatformFileForTransitToFile(dmg_file), &results);
310 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( 310 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished(
311 results)); 311 results));
312 ReleaseProcessIfNeeded(); 312 ReleaseProcessIfNeeded();
313 } 313 }
314 #endif // defined(OS_MACOSX) 314 #endif // defined(OS_MACOSX)
315 315
316 #endif // defined(FULL_SAFE_BROWSING) 316 #endif // defined(FULL_SAFE_BROWSING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698