OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/views/first_run_view_base.h" | 5 #include "chrome/browser/views/first_run_view_base.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "views/controls/image_view.h" | 27 #include "views/controls/image_view.h" |
28 #include "views/controls/label.h" | 28 #include "views/controls/label.h" |
29 #include "views/controls/throbber.h" | 29 #include "views/controls/throbber.h" |
30 #include "views/controls/separator.h" | 30 #include "views/controls/separator.h" |
31 #include "views/standard_layout.h" | 31 #include "views/standard_layout.h" |
32 #include "views/window/client_view.h" | 32 #include "views/window/client_view.h" |
33 #include "views/window/window.h" | 33 #include "views/window/window.h" |
34 | 34 |
35 FirstRunViewBase::FirstRunViewBase(Profile* profile, bool homepage_defined, | 35 FirstRunViewBase::FirstRunViewBase(Profile* profile, bool homepage_defined, |
36 int import_items, int dont_import_items, | 36 int import_items, int dont_import_items, |
37 bool search_engine_experiment) | 37 bool search_engine_experiment, |
| 38 bool randomize_search_engine_experiment) |
38 : preferred_width_(0), | 39 : preferred_width_(0), |
39 background_image_(NULL), | 40 background_image_(NULL), |
40 separator_1_(NULL), | 41 separator_1_(NULL), |
41 default_browser_(NULL), | 42 default_browser_(NULL), |
42 non_default_browser_label_(NULL), | 43 non_default_browser_label_(NULL), |
43 separator_2_(NULL), | 44 separator_2_(NULL), |
44 importer_host_(NULL), | 45 importer_host_(NULL), |
45 profile_(profile), | 46 profile_(profile), |
46 homepage_defined_(homepage_defined), | 47 homepage_defined_(homepage_defined), |
47 import_items_(import_items), | 48 import_items_(import_items), |
48 dont_import_items_(dont_import_items), | 49 dont_import_items_(dont_import_items), |
49 search_engine_experiment_(search_engine_experiment) { | 50 search_engine_experiment_(search_engine_experiment), |
| 51 randomize_search_engine_experiment_(randomize_search_engine_experiment) { |
50 DCHECK(profile); | 52 DCHECK(profile); |
51 SetupControls(); | 53 SetupControls(); |
52 } | 54 } |
53 | 55 |
54 FirstRunViewBase::~FirstRunViewBase() { | 56 FirstRunViewBase::~FirstRunViewBase() { |
55 FirstRun::SetShowFirstRunBubblePref(); | 57 FirstRun::SetShowFirstRunBubblePref(); |
56 FirstRun::SetShowWelcomePagePref(); | 58 FirstRun::SetShowWelcomePagePref(); |
57 } | 59 } |
58 | 60 |
59 void FirstRunViewBase::SetupControls() { | 61 void FirstRunViewBase::SetupControls() { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 248 |
247 bool FirstRunViewBase::SetDefaultBrowser() { | 249 bool FirstRunViewBase::SetDefaultBrowser() { |
248 UserMetrics::RecordAction(UserMetricsAction("FirstRun_Do_DefBrowser"), | 250 UserMetrics::RecordAction(UserMetricsAction("FirstRun_Do_DefBrowser"), |
249 profile_); | 251 profile_); |
250 return ShellIntegration::SetAsDefaultBrowser(); | 252 return ShellIntegration::SetAsDefaultBrowser(); |
251 } | 253 } |
252 | 254 |
253 bool FirstRunViewBase::FirstRunComplete() { | 255 bool FirstRunViewBase::FirstRunComplete() { |
254 return FirstRun::CreateSentinel(); | 256 return FirstRun::CreateSentinel(); |
255 } | 257 } |
OLD | NEW |