Chromium Code Reviews| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 handlers_.push_back(new ShellHandler()); | 102 handlers_.push_back(new ShellHandler()); |
| 103 handlers_.push_back(new FontCacheHandler()); | 103 handlers_.push_back(new FontCacheHandler()); |
| 104 #endif | 104 #endif |
| 105 } | 105 } |
| 106 | 106 |
| 107 ChromeContentUtilityClient::~ChromeContentUtilityClient() { | 107 ChromeContentUtilityClient::~ChromeContentUtilityClient() { |
| 108 } | 108 } |
| 109 | 109 |
| 110 void ChromeContentUtilityClient::UtilityThreadStarted() { | 110 void ChromeContentUtilityClient::UtilityThreadStarted() { |
| 111 #if defined(ENABLE_EXTENSIONS) | 111 #if defined(ENABLE_EXTENSIONS) |
| 112 extensions::ExtensionsHandler::UtilityThreadStarted(); | 112 extensions::UtilityHandler::UtilityThreadStarted(); |
|
asargent_no_longer_on_chrome
2015/01/21 21:41:55
Note: this change just cuts out the middleman, sin
| |
| 113 #endif | 113 #endif |
| 114 | 114 |
| 115 if (kMessageWhitelistSize > 0) { | 115 if (kMessageWhitelistSize > 0) { |
| 116 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 116 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 117 if (command_line->HasSwitch(switches::kUtilityProcessRunningElevated)) { | 117 if (command_line->HasSwitch(switches::kUtilityProcessRunningElevated)) { |
| 118 message_id_whitelist_.insert(kMessageWhitelist, | 118 message_id_whitelist_.insert(kMessageWhitelist, |
| 119 kMessageWhitelist + kMessageWhitelistSize); | 119 kMessageWhitelist + kMessageWhitelistSize); |
| 120 filter_messages_ = true; | 120 filter_messages_ = true; |
| 121 } | 121 } |
| 122 } | 122 } |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 const std::string& mime_type, int64 total_size, bool get_attached_images) { | 348 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. | 349 // Only one IPCDataSource may be created and added to the list of handlers. |
| 350 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); | 350 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); |
| 351 handlers_.push_back(source); | 351 handlers_.push_back(source); |
| 352 | 352 |
| 353 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( | 353 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( |
| 354 source, mime_type, get_attached_images); | 354 source, mime_type, get_attached_images); |
| 355 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); | 355 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); |
| 356 } | 356 } |
| 357 #endif | 357 #endif |
| OLD | NEW |