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

Unified Diff: chrome/browser/ui/sync/one_click_signin_helper.h

Issue 10928242: Switch OneClickSigninHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 | « no previous file | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sync/one_click_signin_helper.h
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.h b/chrome/browser/ui/sync/one_click_signin_helper.h
index b9b1d47a3a7363174317f1b2b7a6dd2c8377adb4..d2522f575117303b43547e329adf9788a87a853c 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.h
+++ b/chrome/browser/ui/sync/one_click_signin_helper.h
@@ -7,6 +7,7 @@
#include <string>
+#include "chrome/browser/tab_contents/web_contents_user_data.h"
#include "content/public/browser/web_contents_observer.h"
namespace content {
@@ -22,9 +23,9 @@ class URLRequest;
// process of helping the user connect his profile with one click. The process
// begins with an infobar and is followed with a confirmation dialog explaining
// more about what this means.
-class OneClickSigninHelper : public content::WebContentsObserver {
+class OneClickSigninHelper : public content::WebContentsObserver,
+ public WebContentsUserData<OneClickSigninHelper> {
public:
- explicit OneClickSigninHelper(content::WebContents* web_contents);
virtual ~OneClickSigninHelper();
// Returns true if the one-click signin feature can be offered at this time.
@@ -48,6 +49,10 @@ class OneClickSigninHelper : public content::WebContentsObserver {
int route_id);
private:
+ explicit OneClickSigninHelper(content::WebContents* web_contents);
+ static int kUserDataKey;
+ friend class WebContentsUserData<OneClickSigninHelper>;
+
// The portion of ShowInfoBarIfPossible() that needs to run on the UI thread.
static void ShowInfoBarUIThread(const std::string& session_index,
const std::string& email,
« no previous file with comments | « no previous file | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698