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

Unified Diff: chrome/browser/ui/android/login_prompt_android.cc

Issue 378633002: Upstream support for basic Http authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/android/chrome_http_auth_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/login_prompt_android.cc
diff --git a/chrome/browser/ui/android/login_prompt_android.cc b/chrome/browser/ui/android/login_prompt_android.cc
index 169ba9097f0f1a9263bc9074a551c7ec3da17e37..88880f4da1972ddab555d7c326cadb66362f9f61 100644
--- a/chrome/browser/ui/android/login_prompt_android.cc
+++ b/chrome/browser/ui/android/login_prompt_android.cc
@@ -8,12 +8,13 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/ui/android/chrome_http_auth_handler.h"
+#include "chrome/browser/ui/android/window_android_helper.h"
#include "chrome/browser/ui/login/login_prompt.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "net/base/auth.h"
+#include "ui/base/android/window_android.h"
using content::BrowserThread;
using net::URLRequest;
@@ -45,18 +46,16 @@ class LoginHandlerAndroid : public LoginHandler {
// Get pointer to TabAndroid
content::WebContents* web_contents = GetWebContentsForLogin();
CHECK(web_contents);
- TabAndroid* tab_android = TabAndroid::FromWebContents(web_contents);
+ WindowAndroidHelper* window_helper = WindowAndroidHelper::FromWebContents(
+ web_contents);
- // Notify TabAndroid that HTTP authentication is required for current page.
- if (tab_android) {
+ // Notify WindowAndroid that HTTP authentication is required.
+ if (window_helper->GetWindowAndroid()) {
chrome_http_auth_handler_.reset(new ChromeHttpAuthHandler(explanation));
chrome_http_auth_handler_->Init();
chrome_http_auth_handler_->SetObserver(this);
-
- tab_android->OnReceivedHttpAuthRequest(
- chrome_http_auth_handler_.get()->GetJavaObject(),
- base::ASCIIToUTF16(auth_info()->challenger.ToString()),
- base::UTF8ToUTF16(auth_info()->realm));
+ chrome_http_auth_handler_->ShowDialog(
+ window_helper->GetWindowAndroid()->GetJavaObject().obj());
// Register to receive a callback to OnAutofillDataAvailable().
SetModel(manager);
« no previous file with comments | « chrome/browser/ui/android/chrome_http_auth_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698