Index: content/browser/webui/url_data_manager_backend.cc |
diff --git a/content/browser/webui/url_data_manager_backend.cc b/content/browser/webui/url_data_manager_backend.cc |
index 72c035a202690072a8a5789af9f8033c0245e167..936316fccce2cd3e8127b7ca4834f7a4e6b843f5 100644 |
--- a/content/browser/webui/url_data_manager_backend.cc |
+++ b/content/browser/webui/url_data_manager_backend.cc |
@@ -33,6 +33,7 @@ |
#include "content/browser/resource_context_impl.h" |
#include "content/browser/webui/shared_resources_data_source.h" |
#include "content/browser/webui/url_data_source_impl.h" |
+#include "content/browser/webui/web_ui_data_source_impl.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/content_browser_client.h" |
@@ -650,6 +651,18 @@ void URLDataManagerBackend::AddDataSource( |
source->backend_ = this; |
} |
+void URLDataManagerBackend::UpdateWebUIDataSource( |
+ const std::string& source_name, |
+ const base::DictionaryValue& update) { |
+ DataSourceMap::iterator it = data_sources_.find(source_name); |
+ if (it == data_sources_.end() || !it->second->IsWebUIDataSourceImpl()) { |
calamity
2016/11/16 05:36:13
Why can't non WebUI data sources be updated?
Dan Beam
2016/11/16 06:02:03
we're only sending updates to the localized "strin
|
+ NOTREACHED(); |
+ return; |
+ } |
+ static_cast<WebUIDataSourceImpl*>(it->second.get()) |
+ ->AddLocalizedStrings(update); |
+} |
+ |
bool URLDataManagerBackend::HasPendingJob( |
URLRequestChromeJob* job) const { |
for (PendingRequestMap::const_iterator i = pending_requests_.begin(); |