Chromium Code Reviews| 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/browser_signin.h" | 5 #include "chrome/browser/browser_signin.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 signin_->Cancel(); | 208 signin_->Cancel(); |
| 209 } | 209 } |
| 210 signin_->GetProfileSyncService()->OnUserSubmittedAuth( | 210 signin_->GetProfileSyncService()->OnUserSubmittedAuth( |
| 211 username, password, captcha, access_code); | 211 username, password, captcha, access_code); |
| 212 } | 212 } |
| 213 | 213 |
| 214 BrowserSignin::BrowserSignin(Profile* profile) | 214 BrowserSignin::BrowserSignin(Profile* profile) |
| 215 : profile_(profile), | 215 : profile_(profile), |
| 216 delegate_(NULL), | 216 delegate_(NULL), |
| 217 html_dialog_ui_delegate_(NULL) { | 217 html_dialog_ui_delegate_(NULL) { |
| 218 BrowserSigninResourcesSource* source = new BrowserSigninResourcesSource(); | |
|
willchan no longer on Chromium
2011/02/08 04:57:52
Is this one being replaced somewhere else?
sky
2011/02/08 05:35:26
As far as I can tell this code is only used in tes
sky
2011/02/08 17:13:46
I think I'm wrong here. Let me fix this.
| |
| 219 BrowserThread::PostTask( | |
| 220 BrowserThread::IO, FROM_HERE, | |
| 221 NewRunnableMethod(ChromeURLDataManager::GetInstance(), | |
| 222 &ChromeURLDataManager::AddDataSource, | |
| 223 make_scoped_refptr(source))); | |
| 224 } | 218 } |
| 225 | 219 |
| 226 BrowserSignin::~BrowserSignin() { | 220 BrowserSignin::~BrowserSignin() { |
| 227 delegate_ = NULL; | 221 delegate_ = NULL; |
| 228 } | 222 } |
| 229 | 223 |
| 230 void BrowserSignin::RequestSignin(TabContents* tab_contents, | 224 void BrowserSignin::RequestSignin(TabContents* tab_contents, |
| 231 const string16& suggested_email, | 225 const string16& suggested_email, |
| 232 const string16& login_message, | 226 const string16& login_message, |
| 233 SigninDelegate* delegate) { | 227 SigninDelegate* delegate) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 323 | 317 |
| 324 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) { | 318 void BrowserSignin::ShowSigninTabModal(TabContents* tab_contents) { |
| 325 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog. | 319 // TODO(johnnyg): Need a linux views implementation for ConstrainedHtmlDialog. |
| 326 #if defined(OS_WIN) || defined(OS_CHROMEOS) || !defined(TOOLKIT_VIEWS) | 320 #if defined(OS_WIN) || defined(OS_CHROMEOS) || !defined(TOOLKIT_VIEWS) |
| 327 html_dialog_ui_delegate_ = CreateHtmlDialogUI(); | 321 html_dialog_ui_delegate_ = CreateHtmlDialogUI(); |
| 328 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_, | 322 ConstrainedHtmlUI::CreateConstrainedHtmlDialog(profile_, |
| 329 html_dialog_ui_delegate_, | 323 html_dialog_ui_delegate_, |
| 330 tab_contents); | 324 tab_contents); |
| 331 #endif | 325 #endif |
| 332 } | 326 } |
| OLD | NEW |