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

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

Issue 7558014: Add a URL param to indicate group selection in Instant field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Thread safe handling of Profiles Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // not want to auto-add keywords, such as keywords for searches on pages that 84 // not want to auto-add keywords, such as keywords for searches on pages that
85 // themselves come from form submissions. 85 // themselves come from form submissions.
86 static string16 GenerateKeyword(const GURL& url, bool autodetected); 86 static string16 GenerateKeyword(const GURL& url, bool autodetected);
87 87
88 // Removes any unnecessary characters from a user input keyword. 88 // Removes any unnecessary characters from a user input keyword.
89 // This removes the leading scheme, "www." and any trailing slash. 89 // This removes the leading scheme, "www." and any trailing slash.
90 static string16 CleanUserInputKeyword(const string16& keyword); 90 static string16 CleanUserInputKeyword(const string16& keyword);
91 91
92 // Returns the search url for t_url. Returns an empty GURL if t_url has no 92 // Returns the search url for t_url. Returns an empty GURL if t_url has no
93 // url(). 93 // url().
94 static GURL GenerateSearchURL(const TemplateURL* t_url); 94 static GURL GenerateSearchURL(const TemplateURL* t_url, Profile* profile);
95 95
96 // Just like GenerateSearchURL except that it takes SearchTermsData to supply 96 // Just like GenerateSearchURL except that it takes SearchTermsData to supply
97 // the data for some search terms. Most of the time GenerateSearchURL should 97 // the data for some search terms. Most of the time GenerateSearchURL should
98 // be called. 98 // be called.
99 static GURL GenerateSearchURLUsingTermsData( 99 static GURL GenerateSearchURLUsingTermsData(
100 const TemplateURL* t_url, 100 const TemplateURL* t_url,
101 const SearchTermsData& search_terms_data); 101 const SearchTermsData& search_terms_data);
102 102
103 // Returns true if there is no TemplateURL that conflicts with the 103 // Returns true if there is no TemplateURL that conflicts with the
104 // keyword/url pair, or there is one but it can be replaced. If there is an 104 // keyword/url pair, or there is one but it can be replaced. If there is an
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 // List of extension IDs waiting for Load to have keywords registered. 454 // List of extension IDs waiting for Load to have keywords registered.
455 std::vector<std::string> pending_extension_ids_; 455 std::vector<std::string> pending_extension_ids_;
456 456
457 // Function returning current time in base::Time units. 457 // Function returning current time in base::Time units.
458 TimeProvider* time_provider_; 458 TimeProvider* time_provider_;
459 459
460 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); 460 DISALLOW_COPY_AND_ASSIGN(TemplateURLService);
461 }; 461 };
462 462
463 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 463 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698