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

Unified Diff: components/search_engines/template_url.h

Issue 939713003: Enabled the "search web for image" context menu item when "Yandex" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: The last arg of ExpectPostParamIs got a default value; the version number increased. Created 5 years, 10 months 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
« no previous file with comments | « components/search_engines/prepopulated_engines.json ('k') | components/search_engines/template_url.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/template_url.h
diff --git a/components/search_engines/template_url.h b/components/search_engines/template_url.h
index a5997934c0bf6e94bbc54d812ad27069f455d3c9..840278a397379c92976ad0aa62a3fe3f964f5495 100644
--- a/components/search_engines/template_url.h
+++ b/components/search_engines/template_url.h
@@ -285,6 +285,7 @@ class TemplateURLRef {
private:
friend class TemplateURL;
+ friend class TemplateURLTest;
FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, SetPrepopulatedAndParse);
FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseParameterKnown);
FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseParameterUnknown);
@@ -344,10 +345,15 @@ class TemplateURLRef {
bool is_post_param;
};
+ // Stores a single parameter for a POST.
+ struct PostParam {
+ std::string name;
+ std::string value;
+ std::string content_type;
+ };
+
// The list of elements to replace.
typedef std::vector<struct Replacement> Replacements;
- // Type to store <key, value> pairs for POST URLs.
- typedef std::pair<std::string, std::string> PostParam;
typedef std::vector<PostParam> PostParams;
// TemplateURLRef internally caches values to make replacement quick. This
« no previous file with comments | « components/search_engines/prepopulated_engines.json ('k') | components/search_engines/template_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698