Index: content/public/browser/web_ui_data_source.h |
diff --git a/content/public/browser/web_ui_data_source.h b/content/public/browser/web_ui_data_source.h |
index 5c278c5069feef7d60c6a1d02d061f78350f76c1..c5104d159d1a095cbe0bc48667d2ad2f1c835b50 100644 |
--- a/content/public/browser/web_ui_data_source.h |
+++ b/content/public/browser/web_ui_data_source.h |
@@ -7,6 +7,8 @@ |
#include <stdint.h> |
Charlie Reis
2016/11/16 18:38:46
nit: No blank line?
|
+#include <memory> |
+ |
#include "base/callback.h" |
#include "base/strings/string16.h" |
#include "content/common/content_export.h" |
@@ -27,10 +29,18 @@ class WebUIDataSource { |
CONTENT_EXPORT static WebUIDataSource* Create(const std::string& source_name); |
- // Adds a WebUI data source to |browser_context|. |
+ // Adds a WebUI data source to |browser_context|. TODO(dbeam): update this API |
+ // to take a std::unique_ptr instead to make it clear that |source| can be |
+ // destroyed and references should not be kept by callers. Use |Update()| |
+ // if you need to change an existing data source. |
CONTENT_EXPORT static void Add(BrowserContext* browser_context, |
WebUIDataSource* source); |
+ CONTENT_EXPORT static void Update( |
Charlie Reis
2016/11/16 18:38:46
Please include comments for all methods in the pub
|
+ BrowserContext* browser_context, |
+ const std::string& source_name, |
+ std::unique_ptr<base::DictionaryValue> update); |
+ |
// Adds a string keyed to its name to our dictionary. |
virtual void AddString(const std::string& name, |
const base::string16& value) = 0; |