Index: chrome/browser/first_run/try_chrome_dialog_view.cc |
diff --git a/chrome/browser/first_run/try_chrome_dialog_view.cc b/chrome/browser/first_run/try_chrome_dialog_view.cc |
index 7db3ee67e2926430fd93d5858f803bf75b4ad59e..8cb4b38b4919a65b90fd1e70d93207ca880ed6be 100644 |
--- a/chrome/browser/first_run/try_chrome_dialog_view.cc |
+++ b/chrome/browser/first_run/try_chrome_dialog_view.cc |
@@ -10,7 +10,7 @@ |
#include "base/message_loop.h" |
#include "base/string16.h" |
#include "chrome/browser/process_singleton.h" |
-#include "chrome/installer/util/browser_distribution.h" |
+#include "chrome/installer/util/user_experiment.h" |
#include "grit/chromium_strings.h" |
#include "grit/generated_resources.h" |
#include "grit/theme_resources.h" |
@@ -174,13 +174,8 @@ TryChromeDialogView::Result TryChromeDialogView::ShowModal( |
layout->AddView(icon); |
// Find out what experiment we are conducting. |
- BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
- if (!dist) { |
- NOTREACHED() << "Cannot determine browser distribution"; |
- return DIALOG_ERROR; |
- } |
- BrowserDistribution::UserExperiment experiment; |
- if (!dist->GetExperimentDetails(&experiment, flavor_) || |
+ installer::ExperimentDetails experiment; |
+ if (!installer::CreateExperimentDetails(flavor_, &experiment) || |
grt (UTC plus 2)
2013/03/12 19:36:18
if (!BrowserDistribution::GetDistribution()->HasUs
huangs
2013/03/14 17:20:45
Done.
|
!experiment.heading) { |
NOTREACHED() << "Cannot determine which headline to show."; |
return DIALOG_ERROR; |
@@ -214,7 +209,7 @@ TryChromeDialogView::Result TryChromeDialogView::ShowModal( |
// Decide if the don't bug me is a button or a radio button. |
bool dont_bug_me_button = |
- ((experiment.flags & BrowserDistribution::kDontBugMeAsButton) != 0); |
+ !!(experiment.flags & installer::kToastUiDontBugMeAsButton); |
// Optional third and fourth row. |
if (!dont_bug_me_button) { |
@@ -225,7 +220,7 @@ TryChromeDialogView::Result TryChromeDialogView::ShowModal( |
dont_try_chrome_->set_listener(this); |
layout->AddView(dont_try_chrome_); |
} |
- if (experiment.flags & BrowserDistribution::kUninstall) { |
+ if (experiment.flags & installer::kToastUiUninstall) { |
layout->StartRow(0, 2); |
kill_chrome_ = new views::RadioButton( |
l10n_util::GetStringUTF16(IDS_UNINSTALL_CHROME), kRadioGroupID); |
@@ -237,7 +232,7 @@ TryChromeDialogView::Result TryChromeDialogView::ShowModal( |
accept_button->set_tag(BT_OK_BUTTON); |
views::Separator* separator = NULL; |
- if (experiment.flags & BrowserDistribution::kMakeDefault) { |
+ if (experiment.flags & installer::kToastUiMakeDefault) { |
// In this flavor we have some veritical space, then a separator line |
// and the 'make default' checkbox and the OK button on the same row. |
layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); |
@@ -267,7 +262,7 @@ TryChromeDialogView::Result TryChromeDialogView::ShowModal( |
} |
} |
- if (experiment.flags & BrowserDistribution::kWhyLink) { |
+ if (experiment.flags & installer::kToastUiWhyLink) { |
layout->StartRowWithPadding(0, 4, 0, 10); |
views::Link* link = new views::Link( |
l10n_util::GetStringUTF16(IDS_TRY_TOAST_WHY)); |