Chromium Code Reviews| 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/sync/one_click_signin_sync_starter.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 #include "components/prefs/pref_service.h" | 37 #include "components/prefs/pref_service.h" |
| 38 #include "components/signin/core/browser/signin_manager.h" | 38 #include "components/signin/core/browser/signin_manager.h" |
| 39 #include "components/signin/core/browser/signin_metrics.h" | 39 #include "components/signin/core/browser/signin_metrics.h" |
| 40 #include "components/signin/core/common/profile_management_switches.h" | 40 #include "components/signin/core/common/profile_management_switches.h" |
| 41 #include "components/sync/driver/sync_prefs.h" | 41 #include "components/sync/driver/sync_prefs.h" |
| 42 #include "content/public/browser/user_metrics.h" | 42 #include "content/public/browser/user_metrics.h" |
| 43 #include "net/base/url_util.h" | 43 #include "net/base/url_util.h" |
| 44 #include "net/url_request/url_request_context_getter.h" | 44 #include "net/url_request/url_request_context_getter.h" |
| 45 #include "ui/base/l10n/l10n_util.h" | 45 #include "ui/base/l10n/l10n_util.h" |
| 46 | 46 |
| 47 using browser_sync::ProfileSyncService; | |
|
skym
2016/09/22 17:25:58
I can't seem to figure out why you sometimes go wi
maxbogue
2016/09/22 19:41:14
General rule of thumb was if the file had > ~5 use
| |
| 48 | |
| 47 namespace { | 49 namespace { |
| 48 | 50 |
| 49 // UMA histogram for tracking what users do when presented with the signin | 51 // UMA histogram for tracking what users do when presented with the signin |
| 50 // screen. | 52 // screen. |
| 51 // Hence, | 53 // Hence, |
| 52 // (a) existing enumerated constants should never be deleted or reordered, and | 54 // (a) existing enumerated constants should never be deleted or reordered, and |
| 53 // (b) new constants should only be appended at the end of the enumeration. | 55 // (b) new constants should only be appended at the end of the enumeration. |
| 54 // | 56 // |
| 55 // Keep this in sync with SigninChoice in histograms.xml. | 57 // Keep this in sync with SigninChoice in histograms.xml. |
| 56 enum SigninChoice { | 58 enum SigninChoice { |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 640 false /* user_gesture */); | 642 false /* user_gesture */); |
| 641 } | 643 } |
| 642 | 644 |
| 643 void OneClickSigninSyncStarter::LoadContinueUrl() { | 645 void OneClickSigninSyncStarter::LoadContinueUrl() { |
| 644 web_contents()->GetController().LoadURL( | 646 web_contents()->GetController().LoadURL( |
| 645 continue_url_, | 647 continue_url_, |
| 646 content::Referrer(), | 648 content::Referrer(), |
| 647 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, | 649 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 648 std::string()); | 650 std::string()); |
| 649 } | 651 } |
| OLD | NEW |