Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: chrome/plugin/plugin_thread.cc

Issue 6046009: Move base/mac_util.h to base/mac and use the base::mac namespace.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/sandbox_mac.mm ('k') | chrome/plugin/webplugin_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/plugin_thread.h" 5 #include "chrome/plugin/plugin_thread.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(USE_X11) 9 #if defined(USE_X11)
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 23 matching lines...) Expand all
34 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" 34 #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
35 35
36 #if defined(TOOLKIT_USES_GTK) 36 #if defined(TOOLKIT_USES_GTK)
37 #include "gfx/gtk_util.h" 37 #include "gfx/gtk_util.h"
38 #endif 38 #endif
39 39
40 #if defined(USE_X11) 40 #if defined(USE_X11)
41 #include "app/x11_util.h" 41 #include "app/x11_util.h"
42 #elif defined(OS_MACOSX) 42 #elif defined(OS_MACOSX)
43 #include "app/l10n_util.h" 43 #include "app/l10n_util.h"
44 #include "base/mac_util.h" 44 #include "base/mac/mac_util.h"
45 #include "base/mac/scoped_cftyperef.h" 45 #include "base/mac/scoped_cftyperef.h"
46 #include "base/sys_string_conversions.h" 46 #include "base/sys_string_conversions.h"
47 #include "grit/chromium_strings.h" 47 #include "grit/chromium_strings.h"
48 #endif 48 #endif
49 49
50 static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls( 50 static base::LazyInstance<base::ThreadLocalPointer<PluginThread> > lazy_tls(
51 base::LINKER_INITIALIZED); 51 base::LINKER_INITIALIZED);
52 52
53 PluginThread::PluginThread() 53 PluginThread::PluginThread()
54 : preloaded_plugin_module_(NULL) { 54 : preloaded_plugin_module_(NULL) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 #if defined(OS_MACOSX) 94 #if defined(OS_MACOSX)
95 base::mac::ScopedCFTypeRef<CFStringRef> plugin_name( 95 base::mac::ScopedCFTypeRef<CFStringRef> plugin_name(
96 base::SysUTF16ToCFStringRef(plugin->plugin_info().name)); 96 base::SysUTF16ToCFStringRef(plugin->plugin_info().name));
97 base::mac::ScopedCFTypeRef<CFStringRef> app_name( 97 base::mac::ScopedCFTypeRef<CFStringRef> app_name(
98 base::SysUTF16ToCFStringRef( 98 base::SysUTF16ToCFStringRef(
99 l10n_util::GetStringUTF16(IDS_SHORT_PLUGIN_APP_NAME))); 99 l10n_util::GetStringUTF16(IDS_SHORT_PLUGIN_APP_NAME)));
100 base::mac::ScopedCFTypeRef<CFStringRef> process_name( 100 base::mac::ScopedCFTypeRef<CFStringRef> process_name(
101 CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ (%@)"), 101 CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ (%@)"),
102 plugin_name.get(), app_name.get())); 102 plugin_name.get(), app_name.get()));
103 mac_util::SetProcessName(process_name); 103 base::mac::SetProcessName(process_name);
104 #endif 104 #endif
105 } 105 }
106 106
107 // Certain plugins, such as flash, steal the unhandled exception filter 107 // Certain plugins, such as flash, steal the unhandled exception filter
108 // thus we never get crash reports when they fault. This call fixes it. 108 // thus we never get crash reports when they fault. This call fixes it.
109 message_loop()->set_exception_restoration(true); 109 message_loop()->set_exception_restoration(true);
110 } 110 }
111 111
112 PluginThread::~PluginThread() { 112 PluginThread::~PluginThread() {
113 if (preloaded_plugin_module_) { 113 if (preloaded_plugin_module_) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 228 }
229 229
230 if (!result || net_error != net::OK) 230 if (!result || net_error != net::OK)
231 return false; 231 return false;
232 232
233 *proxy_list = proxy_result; 233 *proxy_list = proxy_result;
234 return true; 234 return true;
235 } 235 }
236 236
237 } // namespace webkit_glue 237 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « chrome/common/sandbox_mac.mm ('k') | chrome/plugin/webplugin_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698