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

Side by Side Diff: chrome/browser/search_engines/template_url_prepopulate_data.h

Issue 10535125: Move the query to the start of the Google search URL in hopes of being slightly more user-friendly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <string> 10 #include <string>
(...skipping 25 matching lines...) Expand all
36 void GetPrepopulatedEngines(Profile* profile, 36 void GetPrepopulatedEngines(Profile* profile,
37 std::vector<TemplateURL*>* t_urls, 37 std::vector<TemplateURL*>* t_urls,
38 size_t* default_search_provider_index); 38 size_t* default_search_provider_index);
39 39
40 // Returns the default search provider specified by the prepopulate data. 40 // Returns the default search provider specified by the prepopulate data.
41 // The caller owns the returned value, which may be NULL. 41 // The caller owns the returned value, which may be NULL.
42 // If |profile| is NULL, any search provider overrides from the preferences are 42 // If |profile| is NULL, any search provider overrides from the preferences are
43 // not used. 43 // not used.
44 TemplateURL* GetPrepopulatedDefaultSearch(Profile* profile); 44 TemplateURL* GetPrepopulatedDefaultSearch(Profile* profile);
45 45
46 // Both the next two functions use same-origin checks unless the |url| is a
47 // Google seach URL, in which case we'll identify any valid Google hostname, or
48 // the unsubstituted Google prepopulate URL, as "Google".
49
50 // Returns the short name for the matching engine, or url.host() if no engines
51 // match. If no engines match and the |url| can't be converted to a valid GURL,
52 // returns the string in IDS_UNKNOWN_SEARCH_ENGINE_NAME.
53 string16 GetEngineName(const std::string& url);
54
55 // Returns the type of the matching engine, or SEARCH_ENGINE_OTHER if no engines 46 // Returns the type of the matching engine, or SEARCH_ENGINE_OTHER if no engines
56 // match. 47 // match. This uses same-origin checks unless the |url| is a Google seach URL,
48 // in which case we'll identify any valid Google hostname as "Google".
49 //
50 // NOTE: Must be called on the UI thread.
57 SearchEngineType GetEngineType(const std::string& url); 51 SearchEngineType GetEngineType(const std::string& url);
58 52
59 } // namespace TemplateURLPrepopulateData 53 } // namespace TemplateURLPrepopulateData
60 54
61 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_ 55 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/search_engines/template_url_prepopulate_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698