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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 IDS_SYNC_ERROR_SIGNING_IN)); | 425 IDS_SYNC_ERROR_SIGNING_IN)); |
426 break; | 426 break; |
427 } | 427 } |
428 } | 428 } |
429 delete this; | 429 delete this; |
430 } | 430 } |
431 | 431 |
432 void OneClickSigninSyncStarter::SigninSuccess() { | 432 void OneClickSigninSyncStarter::SigninSuccess() { |
433 } | 433 } |
434 | 434 |
435 void OneClickSigninSyncStarter::MergeSessionComplete( | 435 void OneClickSigninSyncStarter::AccountAddedToCookie( |
436 const GoogleServiceAuthError& error) { | 436 const GoogleServiceAuthError& error) { |
437 // Regardless of whether the merge session completed sucessfully or not, | 437 // Regardless of whether the account was successfully added or not, |
438 // continue with sync starting. | 438 // continue with sync starting. |
439 | 439 |
440 if (!sync_setup_completed_callback_.is_null()) | 440 if (!sync_setup_completed_callback_.is_null()) |
441 sync_setup_completed_callback_.Run(SYNC_SETUP_SUCCESS); | 441 sync_setup_completed_callback_.Run(SYNC_SETUP_SUCCESS); |
442 | 442 |
443 switch (start_mode_) { | 443 switch (start_mode_) { |
444 case SYNC_WITH_DEFAULT_SETTINGS: { | 444 case SYNC_WITH_DEFAULT_SETTINGS: { |
445 // Just kick off the sync machine, no need to configure it first. | 445 // Just kick off the sync machine, no need to configure it first. |
446 ProfileSyncService* profile_sync_service = GetProfileSyncService(); | 446 ProfileSyncService* profile_sync_service = GetProfileSyncService(); |
447 if (profile_sync_service) | 447 if (profile_sync_service) |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 false /* user_gesture */); | 606 false /* user_gesture */); |
607 } | 607 } |
608 | 608 |
609 void OneClickSigninSyncStarter::LoadContinueUrl() { | 609 void OneClickSigninSyncStarter::LoadContinueUrl() { |
610 web_contents()->GetController().LoadURL( | 610 web_contents()->GetController().LoadURL( |
611 continue_url_, | 611 continue_url_, |
612 content::Referrer(), | 612 content::Referrer(), |
613 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, | 613 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
614 std::string()); | 614 std::string()); |
615 } | 615 } |
OLD | NEW |