diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-19 23:50:37 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-19 23:50:37 +0000 |
commit | b1390d09433a31fc794dee4b20a37c999476ddcf (patch) | |
tree | 6e2577b48c70f5dbe4505dd31d06f97acf658e55 /chrome/browser/first_run.cc | |
parent | 06416f79b380fe5378bc3fd305e89c762c8408ea (diff) | |
download | chromium_src-b1390d09433a31fc794dee4b20a37c999476ddcf.zip chromium_src-b1390d09433a31fc794dee4b20a37c999476ddcf.tar.gz chromium_src-b1390d09433a31fc794dee4b20a37c999476ddcf.tar.bz2 |
Commit for Miranda.
http://codereview.chromium.org/115265
Original text:
"""
This addresses 3 of the 4 issues described in Issue 9223:
1) Creates a new streamlined bubble with less text.
2) Incorporates a close [x].
3) Driven by configuration option in master_preferences file; this alternate
bubble will be used only if "oem_bubble": true is set.
Requested longer linger time feature will involve mucking with the focus
manager; this change will be uploaded separately.
BUG=9223
TEST=Add "oem_bubble": true to master_preferences file. Run chrome with
--first-run option. Alternate, smaller OEM bubble should appear over the Chrome
browser in the place of the standard first-run bubble.
"""
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run.cc')
-rw-r--r-- | chrome/browser/first_run.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/first_run.cc b/chrome/browser/first_run.cc index 7dbb3df..3a24488 100644 --- a/chrome/browser/first_run.cc +++ b/chrome/browser/first_run.cc @@ -266,6 +266,9 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir, } } + if (parse_result & installer_util::MASTER_PROFILE_OEM_FIRST_RUN_BUBBLE) + FirstRun::SetOEMFirstRunBubblePref(); + FilePath user_prefs = FilePath::FromWStringHack( GetDefaultPrefFilePath(true, user_data_dir.ToWStringHack())); if (user_prefs.empty()) @@ -640,6 +643,18 @@ bool FirstRun::SetShowFirstRunBubblePref() { return true; } +bool FirstRun::SetOEMFirstRunBubblePref() { + PrefService* local_state = g_browser_process->local_state(); + if (!local_state) + return false; + if (!local_state->IsPrefRegistered(prefs::kShouldUseOEMFirstRunBubble)) { + local_state->RegisterBooleanPref(prefs::kShouldUseOEMFirstRunBubble, + false); + local_state->SetBoolean(prefs::kShouldUseOEMFirstRunBubble, true); + } + return true; +} + bool FirstRun::SetShowWelcomePagePref() { PrefService* local_state = g_browser_process->local_state(); if (!local_state) |