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

Unified Diff: chrome/browser/ui/android/infobars/auto_login_infobar_delegate.h

Issue 182253004: Remove desktop auto-login since we don't plan on shipping it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor classes into one Created 6 years, 10 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
Index: chrome/browser/ui/android/infobars/auto_login_infobar_delegate.h
diff --git a/chrome/browser/ui/auto_login_infobar_delegate.h b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate.h
similarity index 75%
rename from chrome/browser/ui/auto_login_infobar_delegate.h
rename to chrome/browser/ui/android/infobars/auto_login_infobar_delegate.h
index f2481a2e41dc2f8a03438fbc85b2715442be502e..397838edf7696689316d8419edc5b60e4818985e 100644
--- a/chrome/browser/ui/auto_login_infobar_delegate.h
+++ b/chrome/browser/ui/android/infobars/auto_login_infobar_delegate.h
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_
-#define CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_
+#ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTO_LOGIN_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTO_LOGIN_INFOBAR_DELEGATE_H_
#include <string>
+#include "base/android/jni_helper.h"
+#include "base/android/scoped_java_ref.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
#include "components/auto_login_parser/auto_login_parser.h"
#include "content/public/browser/notification_observer.h"
@@ -37,6 +39,15 @@ class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate,
// successfully added.
static bool Create(content::WebContents* web_contents, const Params& params);
+ // These methods are defined in downstream code.
+ bool AttachAccount(JavaObjectWeakGlobalRef weak_java_translate_helper);
+ void LoginSuccess(JNIEnv* env, jobject obj, jstring result);
+ void LoginFailed(JNIEnv* env, jobject obj);
+ void LoginDismiss(JNIEnv* env, jobject obj);
+
+ // Register Android JNI bindings.
+ static bool Register(JNIEnv* env);
+
protected:
AutoLoginInfoBarDelegate(const Params& params, Profile* profile);
virtual ~AutoLoginInfoBarDelegate();
@@ -53,6 +64,10 @@ class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate,
HISTOGRAM_BOUNDING_VALUE
};
+ const std::string& realm() const { return params_.header.realm; }
+ const std::string& account() const { return params_.header.account; }
+ const std::string& args() const { return params_.header.args; }
+
// ConfirmInfoBarDelegate:
virtual void InfoBarDismissed() OVERRIDE;
virtual int GetIconID() const OVERRIDE;
@@ -70,6 +85,8 @@ class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate,
void RecordHistogramAction(Actions action);
+ JavaObjectWeakGlobalRef weak_java_auto_login_delegate_;
+ std::string user_;
const Params params_;
// Whether any UI controls in the infobar were pressed or not.
@@ -81,4 +98,4 @@ class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate,
DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate);
};
-#endif // CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_
+#endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_AUTO_LOGIN_INFOBAR_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698