OLD | NEW |
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_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 const std::string& term) const; | 125 const std::string& term) const; |
126 | 126 |
127 // Returns true if this TemplateURLRef has a replacement term of | 127 // Returns true if this TemplateURLRef has a replacement term of |
128 // {google:baseURL} or {google:baseSuggestURL}. | 128 // {google:baseURL} or {google:baseSuggestURL}. |
129 bool HasGoogleBaseURLs() const; | 129 bool HasGoogleBaseURLs() const; |
130 | 130 |
131 // Returns true if both refs are NULL or have the same values. | 131 // Returns true if both refs are NULL or have the same values. |
132 static bool SameUrlRefs(const TemplateURLRef* ref1, | 132 static bool SameUrlRefs(const TemplateURLRef* ref1, |
133 const TemplateURLRef* ref2); | 133 const TemplateURLRef* ref2); |
134 | 134 |
| 135 // Collects metrics whether searches through Google are sent with RLZ string. |
| 136 void CollectRLZMetrics() const; |
| 137 |
135 private: | 138 private: |
136 friend class SearchHostToURLsMapTest; | 139 friend class SearchHostToURLsMapTest; |
137 friend class TemplateURL; | 140 friend class TemplateURL; |
138 friend class TemplateURLModelTestUtil; | 141 friend class TemplateURLModelTestUtil; |
139 friend class TemplateURLTest; | 142 friend class TemplateURLTest; |
140 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseParameterKnown); | 143 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseParameterKnown); |
141 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseParameterUnknown); | 144 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseParameterUnknown); |
142 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLEmpty); | 145 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLEmpty); |
143 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLNoTemplateEnd); | 146 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLNoTemplateEnd); |
144 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLNoKnownParameters); | 147 FRIEND_TEST_ALL_PREFIXES(TemplateURLTest, ParseURLNoKnownParameters); |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 bool created_by_policy_; | 513 bool created_by_policy_; |
511 int usage_count_; | 514 int usage_count_; |
512 SearchEngineType search_engine_type_; | 515 SearchEngineType search_engine_type_; |
513 int logo_id_; | 516 int logo_id_; |
514 int prepopulate_id_; | 517 int prepopulate_id_; |
515 | 518 |
516 // TODO(sky): Add date last parsed OSD file. | 519 // TODO(sky): Add date last parsed OSD file. |
517 }; | 520 }; |
518 | 521 |
519 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 522 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
OLD | NEW |