diff options
author | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 16:14:43 +0000 |
---|---|---|
committer | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-21 16:14:43 +0000 |
commit | 414fde59e8dd46b0a93dbfaea4376ffe59bdf9f9 (patch) | |
tree | db8767d352a4e738ef11a5ab9a9a102179eafc6c | |
parent | 11274acf1fb8f62103f69a7783fc5f9b9fce9df3 (diff) | |
download | chromium_src-414fde59e8dd46b0a93dbfaea4376ffe59bdf9f9.zip chromium_src-414fde59e8dd46b0a93dbfaea4376ffe59bdf9f9.tar.gz chromium_src-414fde59e8dd46b0a93dbfaea4376ffe59bdf9f9.tar.bz2 |
Update check interval adjustment.
BUG=http://code.google.com/p/chromium/issues/detail?id=12255
Review URL: http://codereview.chromium.org/112044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16608 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 74667c7..436fa6c 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -60,6 +60,26 @@ [self initMenuState]; } +// If the auto-update interval is not set, make it 5 hours. +// This code is specific to Mac Chrome Dev Channel. +// Placed here for 2 reasons: +// 1) Same spot as other Pref stuff +// 2) Try and be friendly by keeping this after app launch +// TODO(jrg): remove once we go Beta. +- (void)setUpdateCheckInterval { +#if defined(GOOGLE_CHROME_BUILD) + CFStringRef app = (CFStringRef)@"com.google.Keystone.Agent"; + CFStringRef checkInterval = (CFStringRef)@"checkInterval"; + CFPropertyListRef plist = CFPreferencesCopyAppValue(checkInterval, app); + if (!plist) { + const float fiveHoursInSeconds = 5.0 * 60.0 * 60.0; + NSNumber *value = [NSNumber numberWithFloat:fiveHoursInSeconds]; + CFPreferencesSetAppValue(checkInterval, value, app); + CFPreferencesAppSynchronize(app); + } +#endif +} + // This is called after profiles have been loaded and preferences registered. // It is safe to access the default profile here. - (void)applicationDidFinishLaunching:(NSNotification*)notify { @@ -83,6 +103,7 @@ // Register any Mac-specific preferences. PrefService* prefs = [self defaultProfile]->GetPrefs(); prefs->RegisterBooleanPref(prefs::kShowPageOptionsButtons, false); + [self setUpdateCheckInterval]; // Build up the encoding menu, the order of the items differs based on the // current locale (see http://crbug.com/7647 for details). |