| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // |handlers_| to become invalid. Therefore, it is necessary to break the | 183 // |handlers_| to become invalid. Therefore, it is necessary to break the |
| 184 // loop at this point instead of evaluating it as a loop condition (if the | 184 // loop at this point instead of evaluating it as a loop condition (if the |
| 185 // for loop was using iterators explicitly, as originally done). | 185 // for loop was using iterators explicitly, as originally done). |
| 186 if (handler->OnMessageReceived(message)) | 186 if (handler->OnMessageReceived(message)) |
| 187 return true; | 187 return true; |
| 188 } | 188 } |
| 189 | 189 |
| 190 return false; | 190 return false; |
| 191 } | 191 } |
| 192 | 192 |
| 193 void ChromeContentUtilityClient::RegisterMojoInterfaces( | 193 void ChromeContentUtilityClient::ExposeInterfacesToBrowser( |
| 194 shell::InterfaceRegistry* registry) { | 194 shell::InterfaceRegistry* registry) { |
| 195 // When the utility process is running with elevated privileges, we need to | 195 // When the utility process is running with elevated privileges, we need to |
| 196 // filter messages so that only a whitelist of IPCs can run. In Mojo, there's | 196 // filter messages so that only a whitelist of IPCs can run. In Mojo, there's |
| 197 // no way of filtering individual messages. Instead, we can avoid adding | 197 // no way of filtering individual messages. Instead, we can avoid adding |
| 198 // non-whitelisted Mojo services to the shell::InterfaceRegistry. | 198 // non-whitelisted Mojo services to the shell::InterfaceRegistry. |
| 199 // TODO(amistry): Use a whitelist once the whistlisted IPCs have been | 199 // TODO(amistry): Use a whitelist once the whistlisted IPCs have been |
| 200 // converted to Mojo. | 200 // converted to Mojo. |
| 201 if (filter_messages_) | 201 if (filter_messages_) |
| 202 return; | 202 return; |
| 203 | 203 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 safe_browsing::zip_analyzer::Results results; | 305 safe_browsing::zip_analyzer::Results results; |
| 306 safe_browsing::dmg::AnalyzeDMGFile( | 306 safe_browsing::dmg::AnalyzeDMGFile( |
| 307 IPC::PlatformFileForTransitToFile(dmg_file), &results); | 307 IPC::PlatformFileForTransitToFile(dmg_file), &results); |
| 308 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( | 308 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( |
| 309 results)); | 309 results)); |
| 310 ReleaseProcessIfNeeded(); | 310 ReleaseProcessIfNeeded(); |
| 311 } | 311 } |
| 312 #endif // defined(OS_MACOSX) | 312 #endif // defined(OS_MACOSX) |
| 313 | 313 |
| 314 #endif // defined(FULL_SAFE_BROWSING) | 314 #endif // defined(FULL_SAFE_BROWSING) |
| OLD | NEW |