OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin/chrome_content_plugin_client.h" | 5 #include "chrome/plugin/chrome_content_plugin_client.h" |
6 | 6 |
7 #if defined(ENABLE_REMOTING) | 7 #if defined(ENABLE_REMOTING) |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "content/public/common/content_paths.h" | 10 #include "content/public/common/content_paths.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 PathService::Get(content::DIR_MEDIA_LIBS, &media_path); | 48 PathService::Get(content::DIR_MEDIA_LIBS, &media_path); |
49 if (!media_path.empty()) | 49 if (!media_path.empty()) |
50 media::InitializeMediaLibrary(media_path); | 50 media::InitializeMediaLibrary(media_path); |
51 | 51 |
52 #endif // defined(ENABLE_REMOTING) | 52 #endif // defined(ENABLE_REMOTING) |
53 } | 53 } |
54 | 54 |
55 void ChromeContentPluginClient::PluginProcessStarted( | 55 void ChromeContentPluginClient::PluginProcessStarted( |
56 const string16& plugin_name) { | 56 const string16& plugin_name) { |
57 #if defined(OS_MACOSX) | 57 #if defined(OS_MACOSX) |
58 base::mac::ScopedCFTypeRef<CFStringRef> cf_plugin_name( | 58 base::ScopedCFTypeRef<CFStringRef> cf_plugin_name( |
59 base::SysUTF16ToCFStringRef(plugin_name)); | 59 base::SysUTF16ToCFStringRef(plugin_name)); |
60 base::mac::ScopedCFTypeRef<CFStringRef> app_name( | 60 base::ScopedCFTypeRef<CFStringRef> app_name(base::SysUTF16ToCFStringRef( |
61 base::SysUTF16ToCFStringRef( | 61 l10n_util::GetStringUTF16(IDS_SHORT_PLUGIN_APP_NAME))); |
62 l10n_util::GetStringUTF16(IDS_SHORT_PLUGIN_APP_NAME))); | 62 base::ScopedCFTypeRef<CFStringRef> process_name( |
63 base::mac::ScopedCFTypeRef<CFStringRef> process_name( | 63 CFStringCreateWithFormat(kCFAllocatorDefault, |
64 CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ (%@)"), | 64 NULL, |
65 cf_plugin_name.get(), app_name.get())); | 65 CFSTR("%@ (%@)"), |
| 66 cf_plugin_name.get(), |
| 67 app_name.get())); |
66 base::mac::SetProcessName(process_name); | 68 base::mac::SetProcessName(process_name); |
67 #endif | 69 #endif |
68 } | 70 } |
69 | 71 |
70 } // namespace chrome | 72 } // namespace chrome |
OLD | NEW |