| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/sync_promo/sync_promo_handler2.h" | 5 #include "chrome/browser/ui/webui/sync_promo/sync_promo_handler2.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 window_already_closed_ = true; | 174 window_already_closed_ = true; |
| 175 } | 175 } |
| 176 break; | 176 break; |
| 177 } | 177 } |
| 178 default: { | 178 default: { |
| 179 NOTREACHED(); | 179 NOTREACHED(); |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 | 183 |
| 184 void SyncPromoHandler2::StepWizardForShowSetupUI() { | |
| 185 ProfileSyncService* service = | |
| 186 ProfileSyncServiceFactory::GetInstance()->GetForProfile( | |
| 187 Profile::FromWebUI(web_ui_)); | |
| 188 service->get_wizard().Step(SyncSetupWizard::GetLoginState()); | |
| 189 } | |
| 190 | |
| 191 void SyncPromoHandler2::ShowSetupUI() { | 184 void SyncPromoHandler2::ShowSetupUI() { |
| 192 // We don't need to do anything here; The UI for the sync promo is already | 185 // We don't need to do anything here; The UI for the sync promo is already |
| 193 // displayed. | 186 // displayed. |
| 194 } | 187 } |
| 195 | 188 |
| 196 void SyncPromoHandler2::HandleCloseSyncPromo(const base::ListValue* args) { | 189 void SyncPromoHandler2::HandleCloseSyncPromo(const base::ListValue* args) { |
| 197 CloseSyncSetup(); | 190 CloseSyncSetup(); |
| 198 | 191 |
| 199 // If the user has signed in then set the pref to show them NTP bubble | 192 // If the user has signed in then set the pref to show them NTP bubble |
| 200 // confirming that they're signed in. | 193 // confirming that they're signed in. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 // static variables that won't work if the name changes on differnt calls. | 308 // static variables that won't work if the name changes on differnt calls. |
| 316 if (!histogram_name_.empty()) { | 309 if (!histogram_name_.empty()) { |
| 317 base::Histogram* histogram = base::LinearHistogram::FactoryGet( | 310 base::Histogram* histogram = base::LinearHistogram::FactoryGet( |
| 318 histogram_name_, 1, SYNC_PROMO_BUCKET_BOUNDARY, | 311 histogram_name_, 1, SYNC_PROMO_BUCKET_BOUNDARY, |
| 319 SYNC_PROMO_BUCKET_BOUNDARY + 1, base::Histogram::kNoFlags); | 312 SYNC_PROMO_BUCKET_BOUNDARY + 1, base::Histogram::kNoFlags); |
| 320 histogram->Add(action); | 313 histogram->Add(action); |
| 321 } | 314 } |
| 322 } | 315 } |
| 323 | 316 |
| 324 } // namespace options2 | 317 } // namespace options2 |
| OLD | NEW |