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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 23503065: Fix memory leak in app_controller_mac.mm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
===================================================================
--- chrome/browser/app_controller_mac.mm (revision 222257)
+++ chrome/browser/app_controller_mac.mm (working copy)
@@ -169,12 +169,13 @@
// or a unit test.)
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- base::FilePath appBundlePath =
+ base::FilePath app_bundle_path =
chrome::GetVersionedDirectory().DirName().DirName().DirName();
+ base::ScopedCFTypeRef<CFStringRef> app_bundle_path_cfstring(
+ base::SysUTF8ToCFStringRef(app_bundle_path.value()));
Nico 2013/09/16 21:05:28 This on the other hand is just surprising API. Eve
Alexei Svitkine (slow) 2013/09/16 21:07:25 Yeah, we should rename the API.
CFPreferencesSetAppValue(
base::mac::NSToCFCast(app_mode::kLastRunAppBundlePathPrefsKey),
- base::SysUTF8ToCFStringRef(appBundlePath.value()),
- BaseBundleID_CFString());
+ app_bundle_path_cfstring, BaseBundleID_CFString());
// Sync after a delay avoid I/O contention on startup; 1500 ms is plenty.
BrowserThread::PostDelayedTask(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698