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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const std::string& session_index, | 47 const std::string& session_index, |
48 const std::string& email, | 48 const std::string& email, |
49 const std::string& password, | 49 const std::string& password, |
50 StartSyncMode start_mode, | 50 StartSyncMode start_mode, |
51 content::WebContents* web_contents, | 51 content::WebContents* web_contents, |
52 ConfirmationRequired confirmation_required, | 52 ConfirmationRequired confirmation_required, |
53 signin::Source source, | 53 signin::Source source, |
54 Callback sync_setup_completed_callback) | 54 Callback sync_setup_completed_callback) |
55 : content::WebContentsObserver(web_contents), | 55 : content::WebContentsObserver(web_contents), |
56 start_mode_(start_mode), | 56 start_mode_(start_mode), |
| 57 desktop_type_(chrome::HOST_DESKTOP_TYPE_NATIVE), |
57 confirmation_required_(confirmation_required), | 58 confirmation_required_(confirmation_required), |
58 source_(source), | 59 source_(source), |
59 sync_setup_completed_callback_(sync_setup_completed_callback), | 60 sync_setup_completed_callback_(sync_setup_completed_callback), |
60 weak_pointer_factory_(this) { | 61 weak_pointer_factory_(this) { |
61 DCHECK(profile); | 62 DCHECK(profile); |
62 BrowserList::AddObserver(this); | 63 BrowserList::AddObserver(this); |
63 | 64 |
64 Initialize(profile, browser); | 65 Initialize(profile, browser); |
65 | 66 |
66 // Start the signin process using the cookies in the cookie jar. | 67 // Start the signin process using the cookies in the cookie jar. |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 false); | 484 false); |
484 contents->OpenURL(params); | 485 contents->OpenURL(params); |
485 | 486 |
486 // Activate the tab. | 487 // Activate the tab. |
487 Browser* browser = chrome::FindBrowserWithWebContents(contents); | 488 Browser* browser = chrome::FindBrowserWithWebContents(contents); |
488 int content_index = | 489 int content_index = |
489 browser->tab_strip_model()->GetIndexOfWebContents(contents); | 490 browser->tab_strip_model()->GetIndexOfWebContents(contents); |
490 browser->tab_strip_model()->ActivateTabAt(content_index, | 491 browser->tab_strip_model()->ActivateTabAt(content_index, |
491 false /* user_gesture */); | 492 false /* user_gesture */); |
492 } | 493 } |
OLD | NEW |