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

Unified Diff: testing/iossim/iossim.mm

Issue 14308003: Fix iossim's support for retina devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed duplicate comment Created 7 years, 8 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: testing/iossim/iossim.mm
diff --git a/testing/iossim/iossim.mm b/testing/iossim/iossim.mm
index 7d5dbf872e93cbc9c7e1155fefdbef3cd9caef07..ac03dcd1b15baa29a76343c46b8c3e7597defada 100644
--- a/testing/iossim/iossim.mm
+++ b/testing/iossim/iossim.mm
@@ -491,12 +491,11 @@ BOOL InitializeSimulatorUserHome(NSString* userHomePath, NSString* deviceName) {
// Set the device to simulate. Note that the iOS Simulator must not be running
// for this setting to take effect.
- NSMutableDictionary* plistDict =
- [NSMutableDictionary dictionaryWithObject:deviceName
- forKey:@"SimulateDevice"];
- NSString* plistPath = @"Library/Preferences/com.apple.iphonesimulator.plist";
- [plistDict writeToFile:[userHomePath stringByAppendingPathComponent:plistPath]
- atomically:YES];
+ CFStringRef iPhoneSimulatorAppID = CFSTR("com.apple.iphonesimulator");
+ CFPreferencesSetAppValue(CFSTR("SimulateDevice"),
+ deviceName,
+ iPhoneSimulatorAppID);
+ CFPreferencesAppSynchronize(iPhoneSimulatorAppID);
// Update the environment to use the specified directory as the user home
// directory.
« 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