| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 return handled; | 160 return handled; |
| 161 } | 161 } |
| 162 | 162 |
| 163 // static | 163 // static |
| 164 void ChromeContentUtilityClient::PreSandboxStartup() { | 164 void ChromeContentUtilityClient::PreSandboxStartup() { |
| 165 #if defined(ENABLE_EXTENSIONS) | 165 #if defined(ENABLE_EXTENSIONS) |
| 166 extensions::ExtensionsHandler::PreSandboxStartup(); | 166 extensions::ExtensionsHandler::PreSandboxStartup(); |
| 167 #endif | 167 #endif |
| 168 | 168 |
| 169 #if defined(ENABLE_PRINT_PREVIEW) || defined(OS_WIN) | |
| 170 PrintingHandler::PreSandboxStartup(); | |
| 171 #endif | |
| 172 | |
| 173 #if defined(ENABLE_MDNS) | 169 #if defined(ENABLE_MDNS) |
| 174 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 170 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 175 switches::kUtilityProcessEnableMDns)) { | 171 switches::kUtilityProcessEnableMDns)) { |
| 176 local_discovery::ServiceDiscoveryMessageHandler::PreSandboxStartup(); | 172 local_discovery::ServiceDiscoveryMessageHandler::PreSandboxStartup(); |
| 177 } | 173 } |
| 178 #endif // ENABLE_MDNS | 174 #endif // ENABLE_MDNS |
| 179 } | 175 } |
| 180 | 176 |
| 181 // static | 177 // static |
| 182 SkBitmap ChromeContentUtilityClient::DecodeImage( | 178 SkBitmap ChromeContentUtilityClient::DecodeImage( |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 const std::string& mime_type, int64 total_size, bool get_attached_images) { | 344 const std::string& mime_type, int64 total_size, bool get_attached_images) { |
| 349 // Only one IPCDataSource may be created and added to the list of handlers. | 345 // Only one IPCDataSource may be created and added to the list of handlers. |
| 350 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); | 346 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); |
| 351 handlers_.push_back(source); | 347 handlers_.push_back(source); |
| 352 | 348 |
| 353 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( | 349 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( |
| 354 source, mime_type, get_attached_images); | 350 source, mime_type, get_attached_images); |
| 355 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); | 351 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); |
| 356 } | 352 } |
| 357 #endif | 353 #endif |
| OLD | NEW |