summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2015-04-07 14:58:45 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-07 21:59:21 +0000
commite3d6b757596c96fb8f59fd4d3ca24e2b282bafcb (patch)
tree59b49b0d51f701f7934b6317e984f8aa391e1d4f
parent708ba318c48d27b840274b004ab4ba532e8b8924 (diff)
downloadchromium_src-e3d6b757596c96fb8f59fd4d3ca24e2b282bafcb.zip
chromium_src-e3d6b757596c96fb8f59fd4d3ca24e2b282bafcb.tar.gz
chromium_src-e3d6b757596c96fb8f59fd4d3ca24e2b282bafcb.tar.bz2
Give names to all utility processes.
BUG=472340 Review URL: https://codereview.chromium.org/1062873003 Cr-Commit-Position: refs/heads/master@{#324130}
-rw-r--r--chrome/app/generated_resources.grd65
-rw-r--r--chrome/browser/android/seccomp_support_detector.cc4
-rw-r--r--chrome/browser/chrome_browser_main_win.cc10
-rw-r--r--chrome/browser/chrome_select_file_dialog_factory_win.cc18
-rw-r--r--chrome/browser/chromeos/file_manager/zip_file_creator.cc4
-rw-r--r--chrome/browser/component_updater/component_patcher_operation_out_of_process.cc4
-rw-r--r--chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc4
-rw-r--r--chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_win.cc6
-rw-r--r--chrome/browser/extensions/webstore_install_helper.cc4
-rw-r--r--chrome/browser/extensions/zipfile_installer.cc4
-rw-r--r--chrome/browser/image_decoder.cc4
-rw-r--r--chrome/browser/importer/external_process_importer_client.cc2
-rw-r--r--chrome/browser/local_discovery/pwg_raster_converter.cc4
-rw-r--r--chrome/browser/local_discovery/service_discovery_host_client.cc10
-rw-r--r--chrome/browser/local_discovery/wifi/credential_getter_win.cc4
-rw-r--r--chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc4
-rw-r--r--chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc4
-rw-r--r--chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.cc4
-rw-r--r--chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc4
-rw-r--r--chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc4
-rw-r--r--chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc4
-rw-r--r--chrome/browser/platform_util_win.cc6
-rw-r--r--chrome/browser/printing/pdf_to_emf_converter.cc26
-rw-r--r--chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc4
-rw-r--r--chrome/browser/safe_json_parser.cc4
-rw-r--r--extensions/browser/sandboxed_unpacker.cc2
-rw-r--r--extensions/browser/updater/safe_manifest_parser.cc4
-rw-r--r--extensions/extensions_strings.grd8
28 files changed, 198 insertions, 27 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index bff006f..96e9f63 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -3941,9 +3941,74 @@ Even if you have downloaded files from this website before, the website might ha
</message>
</if>
+ <message name="IDS_UTILITY_PROCESS_COMPONENT_PATCHER_NAME" desc="The name of the utility process used for patching components.">
+ Component Patcher
+ </message>
+ <message name="IDS_UTILITY_PROCESS_IMAGE_DECODER_NAME" desc="The name of the utility process used for decoding images.">
+ Image Decoder
+ </message>
+ <message name="IDS_UTILITY_PROCESS_JSON_PARSER_NAME" desc="The name of the utility process used for parsing JSON files.">
+ JSON Parser
+ </message>
<message name="IDS_UTILITY_PROCESS_PROXY_RESOLVER_NAME" desc="The name of the utility process used for out-of-process V8 proxy resolution.">
V8 Proxy Resolver
</message>
+ <if expr="chromeos">
+ <message name="IDS_UTILITY_PROCESS_ZIP_FILE_CREATOR_NAME" desc="The name of the utility process used for creating zip files.">
+ Zip File Creator
+ </message>
+ </if>
+ <if expr="is_android">
+ <message name="IDS_UTILITY_PROCESS_SECCOMP_DETECTOR_NAME" desc="The name of the utility process used for Seccomp support detection.">
+ Seccomp Detector
+ </message>
+ </if>
+ <if expr="not is_android">
+ <message name="IDS_UTILITY_PROCESS_PROFILE_IMPORTER_NAME" desc="The name of the utility process used for importing profiles.">
+ Profile Importer
+ </message>
+ <message name="IDS_UTILITY_PROCESS_SAFE_BROWSING_ZIP_FILE_ANALYZER_NAME" desc="The name of the utility process used for analyzing .zip files for Safe Browsing.">
+ Safe Browsing Zip File Analyzer
+ </message>
+ </if>
+ <if expr="is_win">
+ <message name="IDS_UTILITY_PROCESS_EMF_CONVERTOR_NAME" desc="The name of the utility process used for converting PDFs to EMFs.">
+ EMF Convertor
+ </message>
+ <message name="IDS_UTILITY_PROCESS_FILE_DIALOG_NAME" desc="The name of the utility process used for handling a file open/save dialog.">
+ File Open/Save Dialog
+ </message>
+ <message name="IDS_UTILITY_PROCESS_FONT_CACHE_BUILDER_NAME" desc="The name of the utility process used for building the DirectWrite font cache.">
+ DirectWrite Font Cache Builder
+ </message>
+ <message name="IDS_UTILITY_PROCESS_WIFI_CREDENTIALS_GETTER_NAME" desc="The name of the utility process used for getting the WiFi credentials">
+ WiFi Credentials Getter
+ </message>
+ </if>
+ <if expr="enable_extensions">
+ <message name="IDS_UTILITY_PROCESS_IMAGE_WRITER_NAME" desc="The name of the utility process used for writing ChromeOS system images.">
+ ChromeOS System Image Writer
+ </message>
+ <message name="IDS_UTILITY_PROCESS_MEDIA_FILE_CHECKER_NAME" desc="The name of the utility process used for checking media files.">
+ Media File Checker
+ </message>
+ <message name="IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME" desc="The name of the utility process used for checking media library files.">
+ Media Library File Checker
+ </message>
+ <message name="IDS_UTILITY_PROCESS_ZIP_FILE_INSTALLER_NAME" desc="The name of the utility process used for unpacking zip files.">
+ Zip File Installer
+ </message>
+ </if>
+ <if expr="enable_print_preview">
+ <message name="IDS_UTILITY_PROCESS_PWG_RASTER_CONVERTOR_NAME" desc="The name of the utility process used for converting PDFs to the PWG Raster format.">
+ PWG Raster Convertor
+ </message>
+ </if>
+ <if expr="enable_service_discovery">
+ <message name="IDS_UTILITY_PROCESS_SERVICE_DISCOVERY_HANDLER_NAME" desc="The name of the utility process used for handling service discovery.">
+ Service Discovery Handler
+ </message>
+ </if>
<if expr="not is_android">
<!-- Performance Monitor page -->
diff --git a/chrome/browser/android/seccomp_support_detector.cc b/chrome/browser/android/seccomp_support_detector.cc
index 4488aee..632cde2 100644
--- a/chrome/browser/android/seccomp_support_detector.cc
+++ b/chrome/browser/android/seccomp_support_detector.cc
@@ -11,8 +11,10 @@
#include "base/metrics/histogram_macros.h"
#include "base/metrics/sparse_histogram.h"
#include "chrome/common/chrome_utility_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
@@ -73,6 +75,8 @@ void SeccompSupportDetector::DetectSeccomp() {
content::UtilityProcessHost* utility_process_host =
content::UtilityProcessHost::Create(
this, base::MessageLoopProxy::current());
+ utility_process_host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_SECCOMP_DETECTOR_NAME));
utility_process_host->Send(new ChromeUtilityMsg_DetectSeccompSupport());
}
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc
index ce9f4a2..101e5dc 100644
--- a/chrome/browser/chrome_browser_main_win.cc
+++ b/chrome/browser/chrome_browser_main_win.cc
@@ -108,12 +108,14 @@ int GetMinimumFontSize() {
class TranslationDelegate : public installer::TranslationDelegate {
public:
- virtual base::string16 GetLocalizedString(int installer_string_id) override;
+ base::string16 GetLocalizedString(int installer_string_id) override;
};
void ExecuteFontCacheBuildTask(const base::FilePath& path) {
base::WeakPtr<content::UtilityProcessHost> utility_process_host(
content::UtilityProcessHost::Create(NULL, NULL)->AsWeakPtr());
+ utility_process_host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_FONT_CACHE_BUILDER_NAME));
utility_process_host->DisableSandbox();
utility_process_host->Send(
new ChromeUtilityHostMsg_BuildDirectWriteFontCache(path));
@@ -361,7 +363,8 @@ void ChromeBrowserMainPartsWin::PrepareRestartOnCrashEnviroment(
// The encoding we use for the info is "title|context|direction" where
// direction is either env_vars::kRtlLocale or env_vars::kLtrLocale depending
// on the current locale.
- base::string16 dlg_strings(l10n_util::GetStringUTF16(IDS_CRASH_RECOVERY_TITLE));
+ base::string16 dlg_strings(
+ l10n_util::GetStringUTF16(IDS_CRASH_RECOVERY_TITLE));
dlg_strings.push_back('|');
base::string16 adjusted_string(
l10n_util::GetStringUTF16(IDS_CRASH_RECOVERY_CONTENT));
@@ -458,7 +461,8 @@ bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() {
// system-level Chrome instead.
const base::string16 text =
l10n_util::GetStringUTF16(IDS_MACHINE_LEVEL_INSTALL_CONFLICT);
- const base::string16 caption = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
+ const base::string16 caption =
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST;
ui::MessageBox(NULL, text, caption, flags);
}
diff --git a/chrome/browser/chrome_select_file_dialog_factory_win.cc b/chrome/browser/chrome_select_file_dialog_factory_win.cc
index 08f2024..40d3baa 100644
--- a/chrome/browser/chrome_select_file_dialog_factory_win.cc
+++ b/chrome/browser/chrome_select_file_dialog_factory_win.cc
@@ -17,9 +17,11 @@
#include "base/synchronization/waitable_event.h"
#include "base/win/metro.h"
#include "chrome/common/chrome_utility_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/utility_process_host.h"
#include "content/public/browser/utility_process_host_client.h"
#include "ipc/ipc_message_macros.h"
+#include "ui/base/l10n/l10n_util.h"
#include "ui/base/win/open_file_name_win.h"
#include "ui/shell_dialogs/select_file_dialog_win.h"
@@ -65,9 +67,9 @@ class GetOpenFileNameClient : public content::UtilityProcessHostClient {
const std::vector<base::FilePath>& filenames() const { return filenames_; }
// UtilityProcessHostClient implementation
- virtual void OnProcessCrashed(int exit_code) override;
- virtual void OnProcessLaunchFailed() override;
- virtual bool OnMessageReceived(const IPC::Message& message) override;
+ void OnProcessCrashed(int exit_code) override;
+ void OnProcessLaunchFailed() override;
+ bool OnMessageReceived(const IPC::Message& message) override;
protected:
virtual ~GetOpenFileNameClient();
@@ -137,6 +139,8 @@ void DoInvokeGetOpenFileName(
base::WeakPtr<content::UtilityProcessHost> utility_process_host(
content::UtilityProcessHost::Create(client, current_task_runner)
->AsWeakPtr());
+ utility_process_host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_FILE_DIALOG_NAME));
utility_process_host->DisableSandbox();
utility_process_host->Send(new ChromeUtilityMsg_GetOpenFileName(
ofn->hwndOwner,
@@ -196,9 +200,9 @@ class GetSaveFileNameClient : public content::UtilityProcessHostClient {
int one_based_filter_index() const { return one_based_filter_index_; }
// UtilityProcessHostClient implementation
- virtual void OnProcessCrashed(int exit_code) override;
- virtual void OnProcessLaunchFailed() override;
- virtual bool OnMessageReceived(const IPC::Message& message) override;
+ void OnProcessCrashed(int exit_code) override;
+ void OnProcessLaunchFailed() override;
+ bool OnMessageReceived(const IPC::Message& message) override;
protected:
virtual ~GetSaveFileNameClient();
@@ -267,6 +271,8 @@ void DoInvokeGetSaveFileName(
base::WeakPtr<content::UtilityProcessHost> utility_process_host(
content::UtilityProcessHost::Create(client, current_task_runner)
->AsWeakPtr());
+ utility_process_host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_FILE_DIALOG_NAME));
utility_process_host->DisableSandbox();
ChromeUtilityMsg_GetSaveFileName_Params params;
params.owner = ofn->hwndOwner;
diff --git a/chrome/browser/chromeos/file_manager/zip_file_creator.cc b/chrome/browser/chromeos/file_manager/zip_file_creator.cc
index f6e0788..6af8346 100644
--- a/chrome/browser/chromeos/file_manager/zip_file_creator.cc
+++ b/chrome/browser/chromeos/file_manager/zip_file_creator.cc
@@ -9,8 +9,10 @@
#include "base/message_loop/message_loop.h"
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/common/chrome_utility_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -91,6 +93,8 @@ void ZipFileCreator::StartProcessOnIOThread(base::File dest_file) {
UtilityProcessHost* host = UtilityProcessHost::Create(
this,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get());
+ host->SetName(
+ l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_ZIP_FILE_CREATOR_NAME));
host->SetExposedDir(src_dir_);
host->Send(new ChromeUtilityMsg_CreateZipFile(src_dir_, src_relative_paths_,
dest_fd));
diff --git a/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc b/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc
index 4242a48..1e35da4 100644
--- a/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc
+++ b/chrome/browser/component_updater/component_patcher_operation_out_of_process.cc
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/files/file_path.h"
#include "chrome/common/chrome_utility_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "components/component_updater/component_updater_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
@@ -17,6 +18,7 @@
#include "courgette/courgette.h"
#include "courgette/third_party/bsdiff.h"
#include "ipc/ipc_message_macros.h"
+#include "ui/base/l10n/l10n_util.h"
namespace component_updater {
@@ -54,6 +56,8 @@ void PatchHost::StartProcess(scoped_ptr<IPC::Message> message) {
// UtilityProcessHost object.
content::UtilityProcessHost* host = content::UtilityProcessHost::Create(
this, base::MessageLoopProxy::current().get());
+ host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_COMPONENT_PATCHER_NAME));
host->DisableSandbox();
host->Send(message.release());
}
diff --git a/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc b/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc
index 37d8090..9c77870 100644
--- a/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc
+++ b/chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc
@@ -7,7 +7,9 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
@@ -90,6 +92,8 @@ void ImageWriterUtilityClient::StartHost() {
base::MessageLoop::current()->message_loop_proxy();
utility_process_host_ = content::UtilityProcessHost::Create(
this, task_runner.get())->AsWeakPtr();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_IMAGE_WRITER_NAME));
#if defined(OS_WIN)
utility_process_host_->ElevatePrivileges();
diff --git a/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_win.cc b/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_win.cc
index 0da377d..99389c2 100644
--- a/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_win.cc
+++ b/chrome/browser/extensions/api/networking_private/networking_private_credentials_getter_win.cc
@@ -10,9 +10,11 @@
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/common/extensions/api/networking_private/networking_private_crypto.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
#include "content/public/browser/utility_process_host_client.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -98,9 +100,11 @@ void CredentialsGetterHostClient::StartProcessOnIOThread(
const std::string& network_guid,
const NetworkingPrivateCredentialsGetter::CredentialsCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
+ callback_ = callback;
UtilityProcessHost* host =
UtilityProcessHost::Create(this, base::MessageLoopProxy::current());
- callback_ = callback;
+ host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_WIFI_CREDENTIALS_GETTER_NAME));
host->ElevatePrivileges();
host->Send(new ChromeUtilityHostMsg_GetWiFiCredentials(network_guid));
}
diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc
index c1413f0..2f406fa 100644
--- a/chrome/browser/extensions/webstore_install_helper.cc
+++ b/chrome/browser/extensions/webstore_install_helper.cc
@@ -11,10 +11,12 @@
#include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_request.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -68,6 +70,8 @@ void WebstoreInstallHelper::StartWorkOnIOThread() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
utility_host_ = UtilityProcessHost::Create(
this, base::MessageLoopProxy::current().get())->AsWeakPtr();
+ utility_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_JSON_PARSER_NAME));
utility_host_->StartBatchMode();
utility_host_->Send(new ChromeUtilityMsg_ParseJSON(manifest_));
diff --git a/chrome/browser/extensions/zipfile_installer.cc b/chrome/browser/extensions/zipfile_installer.cc
index f78fb4a..6f64b60 100644
--- a/chrome/browser/extensions/zipfile_installer.cc
+++ b/chrome/browser/extensions/zipfile_installer.cc
@@ -11,8 +11,10 @@
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -73,6 +75,8 @@ void ZipFileInstaller::StartWorkOnIOThread(const base::FilePath& temp_dir) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
UtilityProcessHost* host =
UtilityProcessHost::Create(this, base::MessageLoopProxy::current().get());
+ host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_ZIP_FILE_INSTALLER_NAME));
host->SetExposedDir(temp_dir);
host->Send(new ChromeUtilityMsg_UnzipToDir(zip_path_, temp_dir));
}
diff --git a/chrome/browser/image_decoder.cc b/chrome/browser/image_decoder.cc
index 9e21662..b0b9ce8 100644
--- a/chrome/browser/image_decoder.cc
+++ b/chrome/browser/image_decoder.cc
@@ -7,8 +7,10 @@
#include "base/bind.h"
#include "chrome/browser/browser_process.h"
#include "chrome/common/chrome_utility_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -127,6 +129,8 @@ void ImageDecoder::StartBatchMode() {
utility_process_host_ =
UtilityProcessHost::Create(this, base::MessageLoopProxy::current().get())
->AsWeakPtr();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_IMAGE_DECODER_NAME));
if (!utility_process_host_->StartBatchMode()) {
utility_process_host_.reset();
return;
diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc
index 384f78e..a44c18e 100644
--- a/chrome/browser/importer/external_process_importer_client.cc
+++ b/chrome/browser/importer/external_process_importer_client.cc
@@ -312,6 +312,8 @@ void ExternalProcessImporterClient::StartProcessOnIOThread(
utility_process_host_ = UtilityProcessHost::Create(
this, BrowserThread::GetMessageLoopProxyForThread(thread_id).get())
->AsWeakPtr();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_PROFILE_IMPORTER_NAME));
utility_process_host_->DisableSandbox();
#if defined(OS_MACOSX)
diff --git a/chrome/browser/local_discovery/pwg_raster_converter.cc b/chrome/browser/local_discovery/pwg_raster_converter.cc
index 11b6c31..ae11a6c 100644
--- a/chrome/browser/local_discovery/pwg_raster_converter.cc
+++ b/chrome/browser/local_discovery/pwg_raster_converter.cc
@@ -14,6 +14,7 @@
#include "base/logging.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/chrome_utility_printing_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "components/cloud_devices/common/cloud_device_description.h"
#include "components/cloud_devices/common/printer_description.h"
#include "content/public/browser/browser_thread.h"
@@ -23,6 +24,7 @@
#include "printing/pdf_render_settings.h"
#include "printing/pwg_raster_settings.h"
#include "printing/units.h"
+#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
@@ -226,6 +228,8 @@ void PwgUtilityProcessHostClient::StartProcessOnIOThread() {
content::UtilityProcessHost::Create(
this,
base::MessageLoop::current()->message_loop_proxy())->AsWeakPtr();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_PWG_RASTER_CONVERTOR_NAME));
utility_process_host_->Send(new ChromeUtilityMsg_StartupPing);
}
diff --git a/chrome/browser/local_discovery/service_discovery_host_client.cc b/chrome/browser/local_discovery/service_discovery_host_client.cc
index ebdbe62..f201ffb 100644
--- a/chrome/browser/local_discovery/service_discovery_host_client.cc
+++ b/chrome/browser/local_discovery/service_discovery_host_client.cc
@@ -5,10 +5,12 @@
#include "chrome/browser/local_discovery/service_discovery_host_client.h"
#include "chrome/common/local_discovery/local_discovery_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
#include "net/dns/mdns_client.h"
#include "net/socket/socket_descriptor.h"
+#include "ui/base/l10n/l10n_util.h"
#if defined(OS_POSIX)
#include <netinet/in.h>
@@ -282,8 +284,8 @@ void ServiceDiscoveryHostClient::OnSocketsReady(const SocketInfoList& sockets) {
DCHECK(!utility_host_);
utility_host_ = UtilityProcessHost::Create(
this, base::MessageLoopProxy::current().get())->AsWeakPtr();
- if (!utility_host_)
- return;
+ utility_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_SERVICE_DISCOVERY_HANDLER_NAME));
utility_host_->EnableMDns();
utility_host_->StartBatchMode();
if (sockets.empty()) {
@@ -304,8 +306,8 @@ void ServiceDiscoveryHostClient::StartOnIOThread() {
DCHECK(!utility_host_);
utility_host_ = UtilityProcessHost::Create(
this, base::MessageLoopProxy::current().get())->AsWeakPtr();
- if (!utility_host_)
- return;
+ utility_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_SERVICE_DISCOVERY_HANDLER_NAME));
utility_host_->EnableMDns();
utility_host_->StartBatchMode();
// Windows does not enumerate networks here.
diff --git a/chrome/browser/local_discovery/wifi/credential_getter_win.cc b/chrome/browser/local_discovery/wifi/credential_getter_win.cc
index fdd0052..5ad439b 100644
--- a/chrome/browser/local_discovery/wifi/credential_getter_win.cc
+++ b/chrome/browser/local_discovery/wifi/credential_getter_win.cc
@@ -5,8 +5,10 @@
#include "chrome/browser/local_discovery/wifi/credential_getter_win.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
+#include "ui/base/l10n/l10n_util.h"
namespace local_discovery {
@@ -33,6 +35,8 @@ void CredentialGetterWin::StartOnIOThread(const std::string& network_guid) {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
content::UtilityProcessHost* host = content::UtilityProcessHost::Create(
this, base::MessageLoopProxy::current());
+ host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_WIFI_CREDENTIALS_GETTER_NAME));
host->ElevatePrivileges();
host->Send(new ChromeUtilityHostMsg_GetWiFiCredentials(network_guid));
}
diff --git a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
index 9d8ebde..f4f67a8 100644
--- a/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
+++ b/chrome/browser/media_galleries/fileapi/safe_audio_video_checker.cc
@@ -11,11 +11,13 @@
#include "base/process/process_handle.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/utility_process_host.h"
#include "content/public/browser/browser_thread.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_platform_file.h"
+#include "ui/base/l10n/l10n_util.h"
SafeAudioVideoChecker::SafeAudioVideoChecker(
base::File file,
@@ -38,6 +40,8 @@ void SafeAudioVideoChecker::Start() {
utility_process_host_ = content::UtilityProcessHost::Create(
this, base::MessageLoopProxy::current())->AsWeakPtr();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_MEDIA_FILE_CHECKER_NAME));
utility_process_host_->Send(new ChromeUtilityMsg_StartupPing);
}
diff --git a/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc b/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc
index e6dcffa..f9dafa9 100644
--- a/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc
+++ b/chrome/browser/media_galleries/fileapi/safe_iapps_library_parser.cc
@@ -7,9 +7,11 @@
#include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
#include "ipc/ipc_platform_file.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -66,6 +68,8 @@ void SafeIAppsLibraryParser::StartProcessOnIOThread() {
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
utility_process_host_ =
UtilityProcessHost::Create(this, message_loop_proxy.get())->AsWeakPtr();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME));
// Wait for the startup notification before sending the main IPC to the
// utility process, so that we can dup the file handle.
utility_process_host_->Send(new ChromeUtilityMsg_StartupPing);
diff --git a/chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.cc b/chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.cc
index 7d7282e..71965bc 100644
--- a/chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.cc
+++ b/chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.cc
@@ -5,8 +5,10 @@
#include "chrome/browser/media_galleries/fileapi/safe_itunes_pref_parser_win.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -40,6 +42,8 @@ void SafeITunesPrefParserWin::StartWorkOnIOThread() {
UtilityProcessHost* host =
UtilityProcessHost::Create(this, base::MessageLoopProxy::current());
+ host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME));
host->Send(new ChromeUtilityMsg_ParseITunesPrefXml(unsafe_xml_));
parser_state_ = STARTED_PARSING_STATE;
}
diff --git a/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc b/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc
index 96eb7f9..3de0b8a 100644
--- a/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc
+++ b/chrome/browser/media_galleries/fileapi/safe_media_metadata_parser.cc
@@ -6,9 +6,11 @@
#include "chrome/browser/extensions/blob_reader.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/utility_process_host.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
@@ -49,6 +51,8 @@ void SafeMediaMetadataParser::StartWorkOnIOThread(
utility_process_host_ = content::UtilityProcessHost::Create(
this, base::MessageLoopProxy::current())->AsWeakPtr();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_MEDIA_FILE_CHECKER_NAME));
utility_process_host_->Send(
new ChromeUtilityMsg_ParseMediaMetadata(mime_type_, blob_size_,
diff --git a/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc b/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc
index b315fbc..e5aaadc 100644
--- a/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc
+++ b/chrome/browser/media_galleries/fileapi/safe_picasa_album_table_reader.cc
@@ -9,8 +9,10 @@
#include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
@@ -65,6 +67,8 @@ void SafePicasaAlbumTableReader::StartWorkOnIOThread() {
this,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())
->AsWeakPtr();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME));
// Wait for the startup notification before sending the main IPC to the
// utility process, so that we can dup the file handle.
utility_process_host_->Send(new ChromeUtilityMsg_StartupPing);
diff --git a/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc b/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc
index 3e5e9aa..6373cb4 100644
--- a/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc
+++ b/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.cc
@@ -7,9 +7,11 @@
#include "base/files/file_util.h"
#include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h"
#include "chrome/common/extensions/chrome_utility_extensions_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/utility_process_host.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -96,6 +98,8 @@ void SafePicasaAlbumsIndexer::StartWorkOnIOThread() {
UtilityProcessHost* host =
UtilityProcessHost::Create(this, base::MessageLoopProxy::current());
+ host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_MEDIA_LIBRARY_FILE_CHECKER_NAME));
host->Send(new ChromeUtilityMsg_IndexPicasaAlbumsContents(album_uids_,
folders_inis_));
parser_state_ = STARTED_PARSING_STATE;
diff --git a/chrome/browser/platform_util_win.cc b/chrome/browser/platform_util_win.cc
index a905b2f..b26746c 100644
--- a/chrome/browser/platform_util_win.cc
+++ b/chrome/browser/platform_util_win.cc
@@ -25,9 +25,11 @@
#include "chrome/browser/platform_util_internal.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/common/chrome_utility_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
#include "content/public/browser/utility_process_host_client.h"
+#include "ui/base/l10n/l10n_util.h"
#include "ui/base/win/shell.h"
#include "ui/gfx/native_widget_types.h"
#include "url/gurl.h"
@@ -54,7 +56,7 @@ void ShowItemInFolderOnFileThread(const base::FilePath& full_path) {
DWORD flags);
static SHOpenFolderAndSelectItemsFuncPtr open_folder_and_select_itemsPtr =
- NULL;
+ nullptr;
static bool initialize_open_folder_proc = true;
if (initialize_open_folder_proc) {
initialize_open_folder_proc = false;
@@ -168,6 +170,8 @@ void OpenItemViaShellInUtilityProcess(const base::FilePath& full_path,
OpenItemType type) {
base::WeakPtr<content::UtilityProcessHost> utility_process_host(
content::UtilityProcessHost::Create(NULL, NULL)->AsWeakPtr());
+ utility_process_host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_FILE_DIALOG_NAME));
utility_process_host->DisableSandbox();
switch (type) {
case OPEN_FILE:
diff --git a/chrome/browser/printing/pdf_to_emf_converter.cc b/chrome/browser/printing/pdf_to_emf_converter.cc
index 48a3845..0e22cca 100644
--- a/chrome/browser/printing/pdf_to_emf_converter.cc
+++ b/chrome/browser/printing/pdf_to_emf_converter.cc
@@ -12,12 +12,14 @@
#include "base/logging.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/chrome_utility_printing_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/utility_process_host.h"
#include "content/public/browser/utility_process_host_client.h"
#include "printing/emf_win.h"
#include "printing/pdf_render_settings.h"
+#include "ui/base/l10n/l10n_util.h"
namespace printing {
@@ -61,8 +63,8 @@ class LazyEmf : public MetafilePlayer {
: temp_dir_(temp_dir), file_(file.Pass()) {}
virtual ~LazyEmf() { Close(); }
- virtual bool SafePlayback(HDC hdc) const override;
- virtual bool SaveTo(base::File* file) const override;
+ bool SafePlayback(HDC hdc) const override;
+ bool SaveTo(base::File* file) const override;
private:
void Close() const;
@@ -103,9 +105,9 @@ class PdfToEmfUtilityProcessHostClient
void Stop();
// UtilityProcessHostClient implementation.
- virtual void OnProcessCrashed(int exit_code) override;
- virtual void OnProcessLaunchFailed() override;
- virtual bool OnMessageReceived(const IPC::Message& message) override;
+ void OnProcessCrashed(int exit_code) override;
+ void OnProcessLaunchFailed() override;
+ bool OnMessageReceived(const IPC::Message& message) override;
private:
class GetPageCallbackData {
@@ -181,12 +183,12 @@ class PdfToEmfConverterImpl : public PdfToEmfConverter {
virtual ~PdfToEmfConverterImpl();
- virtual void Start(const scoped_refptr<base::RefCountedMemory>& data,
- const PdfRenderSettings& conversion_settings,
- const StartCallback& start_callback) override;
+ void Start(const scoped_refptr<base::RefCountedMemory>& data,
+ const PdfRenderSettings& conversion_settings,
+ const StartCallback& start_callback) override;
- virtual void GetPage(int page_number,
- const GetPageCallback& get_page_callback) override;
+ void GetPage(int page_number,
+ const GetPageCallback& get_page_callback) override;
// Helps to cancel callbacks if this object is destroyed.
void RunCallback(const base::Closure& callback);
@@ -298,8 +300,8 @@ void PdfToEmfUtilityProcessHostClient::Start(
content::UtilityProcessHost::Create(
this, base::MessageLoop::current()->message_loop_proxy())
->AsWeakPtr();
- if (!utility_process_host_)
- return OnFailed();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_EMF_CONVERTOR_NAME));
// Should reply with OnProcessStarted().
Send(new ChromeUtilityMsg_StartupPing);
}
diff --git a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
index 92b5716..f23a724 100644
--- a/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
+++ b/chrome/browser/safe_browsing/sandboxed_zip_analyzer.cc
@@ -12,12 +12,14 @@
#include "base/threading/sequenced_worker_pool.h"
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/safe_browsing/zip_analyzer_results.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_switches.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_platform_file.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
@@ -115,6 +117,8 @@ void SandboxedZipAnalyzer::StartProcessOnIOThread() {
this,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get())
->AsWeakPtr();
+ utility_process_host_->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_SAFE_BROWSING_ZIP_FILE_ANALYZER_NAME));
utility_process_host_->Send(new ChromeUtilityMsg_StartupPing);
// Wait for the startup notification before sending the main IPC to the
// utility process, so that we can dup the file handle.
diff --git a/chrome/browser/safe_json_parser.cc b/chrome/browser/safe_json_parser.cc
index f8334ce..232fdd4 100644
--- a/chrome/browser/safe_json_parser.cc
+++ b/chrome/browser/safe_json_parser.cc
@@ -5,8 +5,10 @@
#include "chrome/browser/safe_json_parser.h"
#include "chrome/common/chrome_utility_messages.h"
+#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
using content::UtilityProcessHost;
@@ -32,6 +34,8 @@ void SafeJsonParser::StartWorkOnIOThread() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
UtilityProcessHost* host =
UtilityProcessHost::Create(this, base::MessageLoopProxy::current().get());
+ host->SetName(l10n_util::GetStringUTF16(
+ IDS_UTILITY_PROCESS_JSON_PARSER_NAME));
host->Send(new ChromeUtilityMsg_ParseJSON(unsafe_json_));
}
diff --git a/extensions/browser/sandboxed_unpacker.cc b/extensions/browser/sandboxed_unpacker.cc
index 518cde7..e22109a 100644
--- a/extensions/browser/sandboxed_unpacker.cc
+++ b/extensions/browser/sandboxed_unpacker.cc
@@ -348,6 +348,8 @@ void SandboxedUnpacker::StartProcessOnIOThread(
const base::FilePath& temp_crx_path) {
UtilityProcessHost* host =
UtilityProcessHost::Create(this, unpacker_io_task_runner_.get());
+ host->SetName(
+ l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_EXTENSION_UNPACKER_NAME));
// Grant the subprocess access to the entire subdir the extension file is
// in, so that it can unpack to that dir.
host->SetExposedDir(temp_crx_path.DirName());
diff --git a/extensions/browser/updater/safe_manifest_parser.cc b/extensions/browser/updater/safe_manifest_parser.cc
index f40fc13..05c75a9 100644
--- a/extensions/browser/updater/safe_manifest_parser.cc
+++ b/extensions/browser/updater/safe_manifest_parser.cc
@@ -13,6 +13,8 @@
#include "content/public/common/content_switches.h"
#include "extensions/common/extension_utility_messages.h"
#include "ipc/ipc_message_macros.h"
+#include "grit/extensions_strings.h"
+#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
@@ -45,6 +47,8 @@ void SafeManifestParser::ParseInSandbox() {
content::UtilityProcessHost* host = content::UtilityProcessHost::Create(
this,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get());
+ host->SetName(
+ l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_MANIFEST_PARSER_NAME));
host->Send(new ExtensionUtilityMsg_ParseUpdateManifest(xml_));
}
diff --git a/extensions/extensions_strings.grd b/extensions/extensions_strings.grd
index 0bcf8d9..4dce699 100644
--- a/extensions/extensions_strings.grd
+++ b/extensions/extensions_strings.grd
@@ -472,6 +472,14 @@
Can not unpack extension. To safely unpack an extension, there must be a path to your profile directory that does not contain a symlink. No such path exists for your profile.
</message>
</if>
+
+ <!-- Utility process names. Please keep alphabetized. -->
+ <message name="IDS_UTILITY_PROCESS_EXTENSION_UNPACKER_NAME" desc="The name of the utility process used for unpacking extensions.">
+ Extension Unpacker
+ </message>
+ <message name="IDS_UTILITY_PROCESS_MANIFEST_PARSER_NAME" desc="The name of the utility process used for parsing extension manifests.">
+ Extension Manifest Parser
+ </message>
</messages>
</release>
</grit>