| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 safe_browsing::zip_analyzer::Results results; | 296 safe_browsing::zip_analyzer::Results results; |
| 297 safe_browsing::dmg::AnalyzeDMGFile( | 297 safe_browsing::dmg::AnalyzeDMGFile( |
| 298 IPC::PlatformFileForTransitToFile(dmg_file), &results); | 298 IPC::PlatformFileForTransitToFile(dmg_file), &results); |
| 299 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( | 299 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( |
| 300 results)); | 300 results)); |
| 301 ReleaseProcessIfNeeded(); | 301 ReleaseProcessIfNeeded(); |
| 302 } | 302 } |
| 303 #endif // defined(OS_MACOSX) | 303 #endif // defined(OS_MACOSX) |
| 304 | 304 |
| 305 #endif // defined(FULL_SAFE_BROWSING) | 305 #endif // defined(FULL_SAFE_BROWSING) |
| OLD | NEW |