summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run
diff options
context:
space:
mode:
authortyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 04:32:29 +0000
committertyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 04:32:29 +0000
commitf12cb6439d837429037975c44956425d6a9f34c0 (patch)
tree899840567c35a5e93df29ffd19eccfbbabbb187a /chrome/browser/first_run
parentb17e19920b54ca8b92d73dcb1cc03dae1d6b7ad0 (diff)
downloadchromium_src-f12cb6439d837429037975c44956425d6a9f34c0.zip
chromium_src-f12cb6439d837429037975c44956425d6a9f34c0.tar.gz
chromium_src-f12cb6439d837429037975c44956425d6a9f34c0.tar.bz2
Revert 63005 - If default search is managed, we should not asked the user to choose it at First Run. Make sure the minimum bubble is not showed if there is no default search.
BUG=49306 TEST=Set a managed default search provider. Clear your Chromium user data directory (~/Library/Chromium, ~/.config/chromium, %localappdata%\Chromium) and the "First Run" file found next to the executable. Start Chrome. It should not ask you to choose a default search provider. Disable the default search provider via policy. Make sure the minimal bubble is not shown. Redo these tests for the GOOGLE_CHROME_BUILD to make sure that we still ask about usage stats. Review URL: http://codereview.chromium.org/3565013 TBR=jeanluc@google.com Review URL: http://codereview.chromium.org/3747009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run')
-rw-r--r--chrome/browser/first_run/first_run.cc14
-rw-r--r--chrome/browser/first_run/first_run_mac.mm18
-rw-r--r--chrome/browser/first_run/first_run_win.cc7
3 files changed, 7 insertions, 32 deletions
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 663c52d..596419f 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -22,7 +22,6 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profile_manager.h"
-#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -565,7 +564,7 @@ void FirstRun::AutoImport(
UserMetrics::RecordAction(UserMetricsAction("FirstRunDef_Accept"));
// Launch the search engine dialog only if build is organic, and user has not
- // already set preferences.
+ // already set search preferences.
if (IsOrganic() && !local_state_file_exists) {
// The home page string may be set in the preferences, but the user should
// initially use Chrome with the NTP as home page in organic builds.
@@ -576,14 +575,9 @@ void FirstRun::AutoImport(
if (make_chrome_default)
ShellIntegration::SetAsDefaultBrowser();
- // Don't display the minimal bubble if there is no default search provider.
- TemplateURLModel* search_engines_model = profile->GetTemplateURLModel();
- if (search_engines_model &&
- search_engines_model->GetDefaultSearchProvider()) {
- FirstRun::SetShowFirstRunBubblePref(true);
- // Set the first run bubble to minimal.
- FirstRun::SetMinimalFirstRunBubblePref();
- }
+ FirstRun::SetShowFirstRunBubblePref(true);
+ // Set the first run bubble to minimal.
+ FirstRun::SetMinimalFirstRunBubblePref();
FirstRun::SetShowWelcomePagePref();
FirstRun::SetPersonalDataManagerFirstRunPref();
diff --git a/chrome/browser/first_run/first_run_mac.mm b/chrome/browser/first_run/first_run_mac.mm
index b297d15..3159e9d 100644
--- a/chrome/browser/first_run/first_run_mac.mm
+++ b/chrome/browser/first_run/first_run_mac.mm
@@ -9,8 +9,6 @@
#import "chrome/browser/cocoa/first_run_dialog.h"
#import "chrome/browser/cocoa/search_engine_dialog_controller.h"
#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/profile.h"
-#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/common/pref_names.h"
#include "chrome/installer/util/google_update_constants.h"
@@ -73,12 +71,7 @@ void ShowFirstRun(Profile* profile) {
FirstRun::CreateSentinel();
// Set preference to show first run bubble and welcome page.
- // Don't display the minimal bubble if there is no default search provider.
- TemplateURLModel* search_engines_model = profile->GetTemplateURLModel();
- if (search_engines_model &&
- search_engines_model->GetDefaultSearchProvider()) {
- FirstRun::SetShowFirstRunBubblePref(true);
- }
+ FirstRun::SetShowFirstRunBubblePref(true);
FirstRun::SetShowWelcomePagePref();
}
@@ -87,13 +80,8 @@ void ShowFirstRun(Profile* profile) {
// static
void FirstRun::ShowFirstRunDialog(Profile* profile,
bool randomize_search_engine_experiment) {
- // If the default search is not managed via policy, ask the user to
- // choose a default.
- TemplateURLModel* model = profile->GetTemplateURLModel();
- if (model && !model->is_default_search_managed()) {
- ShowSearchEngineSelectionDialog(profile,
- randomize_search_engine_experiment);
- }
+ ShowSearchEngineSelectionDialog(profile,
+ randomize_search_engine_experiment);
ShowFirstRun(profile);
}
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index a7f7a3c..4f9175d 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -31,7 +31,6 @@
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profile.h"
-#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/views/first_run_search_engine_view.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/notification_service.h"
@@ -454,12 +453,6 @@ bool FirstRun::IsOrganic() {
// static
void FirstRun::ShowFirstRunDialog(Profile* profile,
bool randomize_search_engine_experiment) {
- // If the default search is managed via policy, we don't ask the user to
- // choose.
- TemplateURLModel* model = profile->GetTemplateURLModel();
- if (NULL == model || model->is_default_search_managed())
- return;
-
views::Window* search_engine_dialog = views::Window::CreateChromeWindow(
NULL,
gfx::Rect(),