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

Unified Diff: content/browser/webui/web_ui_data_source_impl.cc

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/web_ui_data_source_impl.cc
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc
index a5364fbf2b2810e36be883d8a3bb4c7fc156ca31..c970c2009353dc77722f7969f397cd3ce86cf550 100644
--- a/content/browser/webui/web_ui_data_source_impl.cc
+++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -35,6 +35,14 @@ void WebUIDataSource::Add(BrowserContext* browser_context,
URLDataManager::AddWebUIDataSource(browser_context, source);
}
+// static
+void WebUIDataSource::Update(BrowserContext* browser_context,
+ const std::string& source_name,
+ std::unique_ptr<base::DictionaryValue> update) {
+ URLDataManager::UpdateWebUIDataSource(browser_context, source_name,
+ std::move(update));
+}
+
// Internal class to hide the fact that WebUIDataSourceImpl implements
// URLDataSource.
class WebUIDataSourceImpl::InternalDataSource : public URLDataSource {
@@ -176,6 +184,10 @@ void WebUIDataSourceImpl::ExcludePathFromGzip(const std::string& path) {
excluded_paths_.insert(path);
}
+bool WebUIDataSourceImpl::IsWebUIDataSourceImpl() const {
+ return true;
+}
+
void WebUIDataSourceImpl::DisableContentSecurityPolicy() {
add_csp_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698