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

Unified Diff: content/browser/webui/url_data_manager.h

Issue 2475593002: MD History: update (instead of re-create) data sources on sign in change (Closed)
Patch Set: old history as well Created 4 years, 1 month 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: content/browser/webui/url_data_manager.h
diff --git a/content/browser/webui/url_data_manager.h b/content/browser/webui/url_data_manager.h
index 8eca18c65614443336f752565e5931bbedf2bdb0..5ceb74d411fce9bb3340ee377114d55fdc10f90e 100644
--- a/content/browser/webui/url_data_manager.h
+++ b/content/browser/webui/url_data_manager.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_H_
#define CONTENT_BROWSER_WEBUI_URL_DATA_MANAGER_H_
+#include <memory>
#include <string>
#include <vector>
@@ -13,6 +14,10 @@
#include "base/supports_user_data.h"
#include "content/common/content_export.h"
+namespace base {
+class DictionaryValue;
+}
+
namespace content {
class BrowserContext;
class URLDataSource;
@@ -41,6 +46,9 @@ class CONTENT_EXPORT URLDataManager : public base::SupportsUserData::Data {
// destructed in the same thread as they are constructed (the UI thread).
void AddDataSource(URLDataSourceImpl* source);
+ void UpdateWebUIDataSource(const std::string& source_name,
+ std::unique_ptr<base::DictionaryValue> update);
+
// Deletes any data sources no longer referenced. This is normally invoked
// for you, but can be invoked to force deletion (such as during shutdown).
static void DeleteDataSources();
@@ -55,6 +63,12 @@ class CONTENT_EXPORT URLDataManager : public base::SupportsUserData::Data {
static void AddWebUIDataSource(BrowserContext* browser_context,
WebUIDataSource* source);
+ // Updates an existing WebUI data source.
+ static void UpdateWebUIDataSource(
+ BrowserContext* browser_context,
+ const std::string& source_name,
+ std::unique_ptr<base::DictionaryValue> update);
+
private:
friend class URLDataSourceImpl;
friend struct DeleteURLDataSource;

Powered by Google App Engine
This is Rietveld 408576698