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

Unified Diff: chrome/browser/ui/webui/app_launcher_login_handler.h

Issue 1143963002: Split NTPLoginHandler across chrome://apps and chrome://history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lower Created 5 years, 7 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/webui/app_launcher_login_handler.h
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.h b/chrome/browser/ui/webui/app_launcher_login_handler.h
similarity index 77%
rename from chrome/browser/ui/webui/ntp/ntp_login_handler.h
rename to chrome/browser/ui/webui/app_launcher_login_handler.h
index d8579f670d40e77ef38d1c5c180657386269f402..a3d15d99c795e3efc0208774f61dc96724c53cda 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.h
+++ b/chrome/browser/ui/webui/app_launcher_login_handler.h
@@ -2,30 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_
-#define CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_
+#ifndef CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_member.h"
-#include "chrome/browser/profiles/profile_info_cache_observer.h"
#include "content/public/browser/web_ui_message_handler.h"
class Profile;
+class ProfileInfoWatcher;
-// The NTP login handler currently simply displays the current logged in
+// The login handler currently simply displays the current logged in
// username at the top of the NTP (and update itself when that changes).
// In the future it may expand to allow users to login from the NTP.
-class NTPLoginHandler : public content::WebUIMessageHandler,
- public ProfileInfoCacheObserver {
+class AppLauncherLoginHandler : public content::WebUIMessageHandler {
public:
- NTPLoginHandler();
- ~NTPLoginHandler() override;
+ AppLauncherLoginHandler();
+ ~AppLauncherLoginHandler() override;
// WebUIMessageHandler implementation:
void RegisterMessages() override;
- // ProfileInfoCacheObserver implementation:
- void OnProfileAuthInfoChanged(const base::FilePath& profile_path) override;
-
// Returns true if the login handler should be shown in a new tab page
// for the given |profile|. |profile| must not be NULL.
static bool ShouldShow(Profile* profile);
@@ -66,7 +64,9 @@ class NTPLoginHandler : public content::WebUIMessageHandler,
// Internal helper method
void UpdateLogin();
- BooleanPrefMember signin_allowed_pref_;
+ scoped_ptr<ProfileInfoWatcher> profile_info_watcher_;
MAD 2015/05/20 19:33:02 Maybe add the same comment you added to the histor
Dan Beam 2015/05/20 21:53:23 Done.
+
+ DISALLOW_COPY_AND_ASSIGN(AppLauncherLoginHandler);
};
-#endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_LOGIN_HANDLER_H_
+#endif // CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_LOGIN_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698