Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1523)

Side by Side Diff: chrome/browser/ui/login/login_prompt_ui.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_context Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698