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

Side by Side Diff: chrome/app/chrome_main.cc

Issue 6594096: Clean up CF To NS Casts and make them slightly safer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix space Created 9 years, 9 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 | « base/mac/mac_util.mm ('k') | chrome/browser/cocoa/install_from_dmg.mm » ('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) 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/app/chrome_main.h" 5 #include "chrome/app/chrome_main.h"
6 6
7 #include "app/app_paths.h" 7 #include "app/app_paths.h"
8 #include "app/app_switches.h" 8 #include "app/app_switches.h"
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 name_id = IDS_RENDERER_APP_NAME; 261 name_id = IDS_RENDERER_APP_NAME;
262 } else if (process_type == switches::kPluginProcess) { 262 } else if (process_type == switches::kPluginProcess) {
263 name_id = IDS_PLUGIN_APP_NAME; 263 name_id = IDS_PLUGIN_APP_NAME;
264 } else if (process_type == switches::kExtensionProcess) { 264 } else if (process_type == switches::kExtensionProcess) {
265 name_id = IDS_WORKER_APP_NAME; 265 name_id = IDS_WORKER_APP_NAME;
266 } else if (process_type == switches::kUtilityProcess) { 266 } else if (process_type == switches::kUtilityProcess) {
267 name_id = IDS_UTILITY_APP_NAME; 267 name_id = IDS_UTILITY_APP_NAME;
268 } 268 }
269 if (name_id) { 269 if (name_id) {
270 NSString* app_name = l10n_util::GetNSString(name_id); 270 NSString* app_name = l10n_util::GetNSString(name_id);
271 base::mac::SetProcessName(reinterpret_cast<CFStringRef>(app_name)); 271 base::mac::SetProcessName(base::mac::NSToCFCast(app_name));
272 } 272 }
273 } 273 }
274 274
275 // Completes the Mach IPC handshake by sending this process' task port to the 275 // Completes the Mach IPC handshake by sending this process' task port to the
276 // parent process. The parent is listening on the Mach port given by 276 // parent process. The parent is listening on the Mach port given by
277 // |GetMachPortName()|. The task port is used by the parent to get CPU/memory 277 // |GetMachPortName()|. The task port is used by the parent to get CPU/memory
278 // stats to display in the task manager. 278 // stats to display in the task manager.
279 void SendTaskPortToParentProcess() { 279 void SendTaskPortToParentProcess() {
280 const mach_msg_timeout_t kTimeoutMs = 100; 280 const mach_msg_timeout_t kTimeoutMs = 100;
281 const int32_t kMessageId = 0; 281 const int32_t kMessageId = 0;
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 766
767 if (SubprocessNeedsResourceBundle(process_type)) 767 if (SubprocessNeedsResourceBundle(process_type))
768 ResourceBundle::CleanupSharedInstance(); 768 ResourceBundle::CleanupSharedInstance();
769 769
770 logging::CleanupChromeLogging(); 770 logging::CleanupChromeLogging();
771 771
772 chrome_main::LowLevelShutdown(); 772 chrome_main::LowLevelShutdown();
773 773
774 return exit_code; 774 return exit_code;
775 } 775 }
OLDNEW
« no previous file with comments | « base/mac/mac_util.mm ('k') | chrome/browser/cocoa/install_from_dmg.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698