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 "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
422 default: | 422 default: |
423 DisplayFinalConfirmationBubble(l10n_util::GetStringUTF16( | 423 DisplayFinalConfirmationBubble(l10n_util::GetStringUTF16( |
424 IDS_SYNC_ERROR_SIGNING_IN)); | 424 IDS_SYNC_ERROR_SIGNING_IN)); |
425 break; | 425 break; |
426 } | 426 } |
427 } | 427 } |
428 delete this; | 428 delete this; |
429 } | 429 } |
430 | 430 |
431 void OneClickSigninSyncStarter::SigninSuccess() { | 431 void OneClickSigninSyncStarter::SigninSuccess() { |
432 const GURL& current_url = web_contents()->GetURL(); | |
Roger Tawa OOO till Jul 10th
2015/12/03 18:18:06
It seems the web contents could be null sometimes.
gogerald1
2015/12/03 19:03:18
Done.
| |
433 signin_metrics::LogSigninAccessPointCompleted( | |
434 signin::GetAccessPointForPromoURL(current_url)); | |
435 signin_metrics::LogSigninReason( | |
436 signin::GetSigninReasonForPromoURL(current_url)); | |
432 } | 437 } |
433 | 438 |
434 void OneClickSigninSyncStarter::AccountAddedToCookie( | 439 void OneClickSigninSyncStarter::AccountAddedToCookie( |
435 const GoogleServiceAuthError& error) { | 440 const GoogleServiceAuthError& error) { |
436 // Regardless of whether the account was successfully added or not, | 441 // Regardless of whether the account was successfully added or not, |
437 // continue with sync starting. | 442 // continue with sync starting. |
438 | 443 |
439 if (!sync_setup_completed_callback_.is_null()) | 444 if (!sync_setup_completed_callback_.is_null()) |
440 sync_setup_completed_callback_.Run(SYNC_SETUP_SUCCESS); | 445 sync_setup_completed_callback_.Run(SYNC_SETUP_SUCCESS); |
441 | 446 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
605 false /* user_gesture */); | 610 false /* user_gesture */); |
606 } | 611 } |
607 | 612 |
608 void OneClickSigninSyncStarter::LoadContinueUrl() { | 613 void OneClickSigninSyncStarter::LoadContinueUrl() { |
609 web_contents()->GetController().LoadURL( | 614 web_contents()->GetController().LoadURL( |
610 continue_url_, | 615 continue_url_, |
611 content::Referrer(), | 616 content::Referrer(), |
612 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, | 617 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
613 std::string()); | 618 std::string()); |
614 } | 619 } |
OLD | NEW |