Index: components/search_engines/template_url_parser.h |
diff --git a/components/search_engines/template_url_parser.h b/components/search_engines/template_url_parser.h |
index ead5906b91861462f524f4b0e962f2e67f07bdc3..50ba40a5fba5ad72c93df15c80ad300d66dcf331 100644 |
--- a/components/search_engines/template_url_parser.h |
+++ b/components/search_engines/template_url_parser.h |
@@ -7,6 +7,7 @@ |
#include <stddef.h> |
+#include <memory> |
#include <string> |
#include "base/macros.h" |
@@ -30,19 +31,19 @@ class TemplateURLParser { |
}; |
// Decodes the chunk of data representing a TemplateURL, creates the |
- // TemplateURL, and returns it. The caller owns the returned object. |
- // Returns NULL if data does not describe a valid TemplateURL, the |
- // URLs referenced do not point to valid http/https resources, or for some |
- // other reason we do not support the described TemplateURL. |
- // |parameter_filter| can be used if you want to filter some parameters out of |
- // the URL. For example, when importing from another browser, we remove any |
- // parameter identifying that browser. If set to NULL, the URL is not |
- // modified. |
- static TemplateURL* Parse(const SearchTermsData& search_terms_data, |
- bool show_in_default_list, |
- const char* data, |
- size_t length, |
- ParameterFilter* parameter_filter); |
+ // TemplateURL, and returns it. Returns an empty unique_ptr if the data does |
Peter Kasting
2016/09/01 22:55:41
Nit: "Returns null"?
Avi (use Gerrit)
2016/09/01 23:28:33
Done.
|
+ // not describe a valid TemplateURL, the URLs referenced do not point to valid |
+ // http/https resources, or for some other reason we do not support the |
+ // described TemplateURL. |parameter_filter| can be used if you want to |
+ // filter some parameters out of the URL. For example, when importing from |
+ // another browser, we remove any parameter identifying that browser. If set |
+ // to NULL, the URL is not modified. |
+ static std::unique_ptr<TemplateURL> Parse( |
+ const SearchTermsData& search_terms_data, |
+ bool show_in_default_list, |
+ const char* data, |
+ size_t length, |
+ ParameterFilter* parameter_filter); |
private: |
// No one should create one of these. |