| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_handler.h" | 5 #include "chrome/browser/ui/webui/sync_promo/sync_promo_handler.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" |
| 11 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/sync/profile_sync_service.h" | 13 #include "chrome/browser/sync/profile_sync_service.h" |
| 14 #include "chrome/browser/sync/sync_setup_flow.h" | 14 #include "chrome/browser/sync/sync_setup_flow.h" |
| 15 #include "chrome/browser/tabs/tab_strip_model.h" | 15 #include "chrome/browser/tabs/tab_strip_model.h" |
| 16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
| 17 #include "chrome/browser/ui/browser_list.h" | 17 #include "chrome/browser/ui/browser_list.h" |
| 18 #include "chrome/browser/ui/webui/sync_promo/sync_promo_trial.h" | 18 #include "chrome/browser/ui/webui/sync_promo/sync_promo_trial.h" |
| 19 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" | 19 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
| 20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
| 21 #include "chrome/common/extensions/extension_constants.h" | 21 #include "chrome/common/extensions/extension_constants.h" |
| 22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 23 #include "chrome/common/url_constants.h" | 23 #include "chrome/common/url_constants.h" |
| 24 #include "content/browser/tab_contents/navigation_controller.h" | 24 #include "content/public/browser/navigation_controller.h" |
| 25 #include "content/public/browser/navigation_entry.h" | 25 #include "content/public/browser/navigation_entry.h" |
| 26 #include "content/public/browser/notification_details.h" | 26 #include "content/public/browser/notification_details.h" |
| 27 #include "content/public/browser/notification_service.h" | 27 #include "content/public/browser/notification_service.h" |
| 28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
| 29 | 29 |
| 30 using content::OpenURLParams; | 30 using content::OpenURLParams; |
| 31 using content::Referrer; | 31 using content::Referrer; |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 Profile* profile = Profile::FromWebUI(web_ui()); | 292 Profile* profile = Profile::FromWebUI(web_ui()); |
| 293 sync_promo_trial::RecordUserSignedInWithTrialBrand(is_start_up, profile); | 293 sync_promo_trial::RecordUserSignedInWithTrialBrand(is_start_up, profile); |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 | 296 |
| 297 void SyncPromoHandler::RecordUserFlowAction(int action) { | 297 void SyncPromoHandler::RecordUserFlowAction(int action) { |
| 298 // Send an enumeration to our single user flow histogram. | 298 // Send an enumeration to our single user flow histogram. |
| 299 UMA_HISTOGRAM_ENUMERATION("SyncPromo.UserFlow", action, | 299 UMA_HISTOGRAM_ENUMERATION("SyncPromo.UserFlow", action, |
| 300 SYNC_PROMO_BUCKET_BOUNDARY); | 300 SYNC_PROMO_BUCKET_BOUNDARY); |
| 301 } | 301 } |
| OLD | NEW |