| 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 "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 IPC_END_MESSAGE_MAP() | 144 IPC_END_MESSAGE_MAP() |
| 145 | 145 |
| 146 for (Handlers::iterator it = handlers_.begin(); | 146 for (Handlers::iterator it = handlers_.begin(); |
| 147 !handled && it != handlers_.end(); ++it) { | 147 !handled && it != handlers_.end(); ++it) { |
| 148 handled = (*it)->OnMessageReceived(message); | 148 handled = (*it)->OnMessageReceived(message); |
| 149 } | 149 } |
| 150 | 150 |
| 151 return handled; | 151 return handled; |
| 152 } | 152 } |
| 153 | 153 |
| 154 void ChromeContentUtilityClient::PreSandboxStartup() { |
| 155 #if defined(ENABLE_MDNS) |
| 156 local_discovery::ServiceDiscoveryMessageHandler::PreSandboxStartup(); |
| 157 #endif // ENABLE_MDNS |
| 158 } |
| 159 |
| 154 void ChromeContentUtilityClient::OnUnpackExtension( | 160 void ChromeContentUtilityClient::OnUnpackExtension( |
| 155 const base::FilePath& extension_path, | 161 const base::FilePath& extension_path, |
| 156 const std::string& extension_id, | 162 const std::string& extension_id, |
| 157 int location, | 163 int location, |
| 158 int creation_flags) { | 164 int creation_flags) { |
| 159 CHECK_GT(location, extensions::Manifest::INVALID_LOCATION); | 165 CHECK_GT(location, extensions::Manifest::INVALID_LOCATION); |
| 160 CHECK_LT(location, extensions::Manifest::NUM_LOCATIONS); | 166 CHECK_LT(location, extensions::Manifest::NUM_LOCATIONS); |
| 161 extensions::PermissionsInfo::GetInstance()->InitializeWithDelegate( | 167 extensions::PermissionsInfo::GetInstance()->InitializeWithDelegate( |
| 162 extensions::ChromeAPIPermissions()); | 168 extensions::ChromeAPIPermissions()); |
| 163 extensions::RegisterChromeManifestHandlers(); | 169 extensions::RegisterChromeManifestHandlers(); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 bool parse_success = reader.Init(); | 558 bool parse_success = reader.Init(); |
| 553 Send(new ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished( | 559 Send(new ChromeUtilityHostMsg_ParsePicasaPMPDatabase_Finished( |
| 554 parse_success, | 560 parse_success, |
| 555 reader.albums(), | 561 reader.albums(), |
| 556 reader.folders())); | 562 reader.folders())); |
| 557 ReleaseProcessIfNeeded(); | 563 ReleaseProcessIfNeeded(); |
| 558 } | 564 } |
| 559 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 565 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
| 560 | 566 |
| 561 } // namespace chrome | 567 } // namespace chrome |
| OLD | NEW |