| 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/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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |