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

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

Issue 2361513003: MD History: Update sign in state in data source (Closed)
Patch Set: fix promo crash Created 4 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
Index: chrome/browser/ui/webui/history_ui.h
diff --git a/chrome/browser/ui/webui/history_ui.h b/chrome/browser/ui/webui/history_ui.h
index 13b012cde9ad1b887ad29a83066a495ad4377469..78f187430d52591c19d3d65ef440726b61e9ed0f 100644
--- a/chrome/browser/ui/webui/history_ui.h
+++ b/chrome/browser/ui/webui/history_ui.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_WEBUI_HISTORY_UI_H_
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "content/public/browser/web_ui_controller.h"
#include "ui/base/layout.h"
@@ -15,6 +16,10 @@ namespace base {
class RefCountedMemory;
}
+namespace content {
+class WebUIDataSource;
+}
+
class HistoryUI : public content::WebUIController {
public:
explicit HistoryUI(content::WebUI* web_ui);
@@ -24,6 +29,14 @@ class HistoryUI : public content::WebUIController {
ui::ScaleFactor scale_factor);
private:
+ // Callback method to update sign in state in data source when profile info
+ // changed.
+ void SignInChanged(bool signed_in);
+
+ content::WebUIDataSource* data_source_; // weak
+
+ base::WeakPtrFactory<HistoryUI> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(HistoryUI);
};

Powered by Google App Engine
This is Rietveld 408576698