Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SEARCH_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_SEARCH_H_ |
| 6 #define CHROME_BROWSER_SEARCH_SEARCH_H_ | 6 #define CHROME_BROWSER_SEARCH_SEARCH_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 // lead to an infinite recursion. | 116 // lead to an infinite recursion. |
| 117 bool IsInstantEnabled(Profile* profile); | 117 bool IsInstantEnabled(Profile* profile); |
| 118 | 118 |
| 119 // Returns true if the aggressive local NTP fallback is enabled in field | 119 // Returns true if the aggressive local NTP fallback is enabled in field |
| 120 // trials. | 120 // trials. |
| 121 bool IsAggressiveLocalNTPFallbackEnabled(); | 121 bool IsAggressiveLocalNTPFallbackEnabled(); |
| 122 | 122 |
| 123 // Returns true if |my_url| matches |other_url|. | 123 // Returns true if |my_url| matches |other_url|. |
| 124 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url); | 124 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url); |
| 125 | 125 |
| 126 // Transforms the input |url| into its "privileged URL". The returned URL | |
| 127 // facilitates grouping process-per-site. The |url| is transformed, for | |
| 128 // example, from | |
| 129 // | |
| 130 // https://www.google.com/search?espv=1&q=tractors | |
| 131 // | |
| 132 // to the privileged URL | |
| 133 // | |
| 134 // chrome-search://www.google.com/search?espv=1&q=tractors | |
| 135 // | |
| 136 // Notice the scheme change. | |
| 137 // | |
| 138 // If the input is already an privileged URL then that same URL is returned. | |
|
sreeram
2013/05/01 19:17:45
an -> a
Shishir
2013/05/01 21:53:49
Done.
| |
| 139 GURL GetPrivilegedURLForInstant(const GURL& url, Profile* profile); | |
| 140 | |
| 141 // Returns true if the input |url| is a privileged Instant URL. | |
| 142 bool IsPrivilegedURLForInstant(const GURL& url); | |
| 143 | |
| 126 // ----------------------------------------------------- | 144 // ----------------------------------------------------- |
| 127 // The following APIs are exposed for use in tests only. | 145 // The following APIs are exposed for use in tests only. |
| 128 // ----------------------------------------------------- | 146 // ----------------------------------------------------- |
| 129 | 147 |
| 130 // Forces the Instant Extended API to be enabled for tests. | 148 // Forces the Instant Extended API to be enabled for tests. |
| 131 void EnableInstantExtendedAPIForTesting(); | 149 void EnableInstantExtendedAPIForTesting(); |
| 132 | 150 |
| 133 // Type for a collection of experiment configuration parameters. | 151 // Type for a collection of experiment configuration parameters. |
| 134 typedef std::vector<std::pair<std::string, std::string> > FieldTrialFlags; | 152 typedef std::vector<std::pair<std::string, std::string> > FieldTrialFlags; |
| 135 | 153 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 const TemplateURLRef& ref, | 188 const TemplateURLRef& ref, |
| 171 int start_margin); | 189 int start_margin); |
| 172 | 190 |
| 173 // Returns whether the default search provider has a valid Instant URL in its | 191 // Returns whether the default search provider has a valid Instant URL in its |
| 174 // template. Exposed for testing only. | 192 // template. Exposed for testing only. |
| 175 bool DefaultSearchProviderSupportsInstant(Profile* profile); | 193 bool DefaultSearchProviderSupportsInstant(Profile* profile); |
| 176 | 194 |
| 177 } // namespace chrome | 195 } // namespace chrome |
| 178 | 196 |
| 179 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 197 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
| OLD | NEW |