| 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/ui/login/login_prompt.h" | 5 #include "chrome/browser/ui/login/login_prompt.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 } | 235 } |
| 236 } | 236 } |
| 237 | 237 |
| 238 void LoginHandlerHtml::BuildViewForPasswordManager( | 238 void LoginHandlerHtml::BuildViewForPasswordManager( |
| 239 PasswordManager* manager, const string16& explanation) { | 239 PasswordManager* manager, const string16& explanation) { |
| 240 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 240 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 241 | 241 |
| 242 LOG(INFO) << "BuildViewForPasswordManager"; | 242 LOG(INFO) << "BuildViewForPasswordManager"; |
| 243 | 243 |
| 244 TabContents* tab_contents = GetTabContentsForLogin(); | 244 TabContents* tab_contents = GetTabContentsForLogin(); |
| 245 LoginHandlerSource::RegisterDataSource(tab_contents->profile()); | 245 Profile* profile = static_cast<Profile*>(tab_contents->browser_context()); |
| 246 LoginHandlerSource::RegisterDataSource(profile); |
| 246 delegate_ = new LoginHandlerHtmlDelegate(this, tab_contents, explanation); | 247 delegate_ = new LoginHandlerHtmlDelegate(this, tab_contents, explanation); |
| 247 ConstrainedWindow* dialog = ConstrainedHtmlUI::CreateConstrainedHtmlDialog( | 248 ConstrainedWindow* dialog = ConstrainedHtmlUI::CreateConstrainedHtmlDialog( |
| 248 tab_contents->profile(), delegate_, tab_contents); | 249 profile, delegate_, tab_contents); |
| 249 | 250 |
| 250 SetModel(manager); | 251 SetModel(manager); |
| 251 SetDialog(dialog); | 252 SetDialog(dialog); |
| 252 | 253 |
| 253 NotifyAuthNeeded(); | 254 NotifyAuthNeeded(); |
| 254 } | 255 } |
| 255 | 256 |
| 256 // static | 257 // static |
| 257 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, | 258 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, |
| 258 net::URLRequest* request) { | 259 net::URLRequest* request) { |
| 259 return new LoginHandlerHtml(auth_info, request); | 260 return new LoginHandlerHtml(auth_info, request); |
| 260 } | 261 } |
| OLD | NEW |