summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/first_run_view_base.cc
diff options
context:
space:
mode:
authorkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 18:35:18 +0000
committerkuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 18:35:18 +0000
commitc6d5cdb28856a33676e3bf40e213bddf204df9df (patch)
tree0430bfcae805c2a4a46efdfbbd3d2c343353e935 /chrome/browser/views/first_run_view_base.cc
parent77dc77607d70acba487da70dfaa3f52a6e41a7ab (diff)
downloadchromium_src-c6d5cdb28856a33676e3bf40e213bddf204df9df.zip
chromium_src-c6d5cdb28856a33676e3bf40e213bddf204df9df.tar.gz
chromium_src-c6d5cdb28856a33676e3bf40e213bddf204df9df.tar.bz2
Make importer obey import_search_engine preference even if FRUI is enabled.
With this change importer will give preference to the value specified in master preference for import_search_engine instead of ignoring it like before. BUG=23649 TEST=Specified in above bug. Review URL: http://codereview.chromium.org/274081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/first_run_view_base.cc')
-rw-r--r--chrome/browser/views/first_run_view_base.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/chrome/browser/views/first_run_view_base.cc b/chrome/browser/views/first_run_view_base.cc
index 4d420e0..1fa85d4 100644
--- a/chrome/browser/views/first_run_view_base.cc
+++ b/chrome/browser/views/first_run_view_base.cc
@@ -30,7 +30,8 @@
#include "views/window/client_view.h"
#include "views/window/window.h"
-FirstRunViewBase::FirstRunViewBase(Profile* profile, bool homepage_defined)
+FirstRunViewBase::FirstRunViewBase(Profile* profile, bool homepage_defined,
+ int import_items, int dont_import_items)
: preferred_width_(0),
background_image_(NULL),
separator_1_(NULL),
@@ -38,7 +39,9 @@ FirstRunViewBase::FirstRunViewBase(Profile* profile, bool homepage_defined)
separator_2_(NULL),
importer_host_(NULL),
profile_(profile),
- homepage_defined_(homepage_defined) {
+ homepage_defined_(homepage_defined),
+ import_items_(import_items),
+ dont_import_items_(dont_import_items) {
DCHECK(profile);
SetupControls();
}
@@ -160,11 +163,19 @@ std::wstring FirstRunViewBase::GetDialogButtonLabel(
return std::wstring();
}
-int FirstRunViewBase::GetDefaultImportItems() const {
+int FirstRunViewBase::GetImportItems() const {
// It is best to avoid importing cookies because there is a bug that make
// the process take way too much time among other issues. So for the time
// being we say: TODO(CPU): Bug 1196875
- int items = HISTORY | FAVORITES | PASSWORDS | SEARCH_ENGINES;
+ int items = import_items_;
+ if (!(dont_import_items_ & HISTORY))
+ items = items | HISTORY;
+ if (!(dont_import_items_ & FAVORITES))
+ items = items | FAVORITES;
+ if (!(dont_import_items_ & PASSWORDS))
+ items = items | PASSWORDS;
+ if (!(dont_import_items_ & SEARCH_ENGINES))
+ items = items | SEARCH_ENGINES;
if (!homepage_defined_)
items = items | HOME_PAGE;
return items;