| OLD | NEW |
| 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_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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 void SetURL(const std::string& url); | 412 void SetURL(const std::string& url); |
| 413 void SetPrepopulateId(int id); | 413 void SetPrepopulateId(int id); |
| 414 | 414 |
| 415 // Resets the keyword if IsGoogleSearchURLWithReplaceableKeyword() or |force|. | 415 // Resets the keyword if IsGoogleSearchURLWithReplaceableKeyword() or |force|. |
| 416 // The |force| parameter is useful when the existing keyword is known to be | 416 // The |force| parameter is useful when the existing keyword is known to be |
| 417 // a placeholder. The resulting keyword is generated using | 417 // a placeholder. The resulting keyword is generated using |
| 418 // TemplateURLService::GenerateSearchURL() and | 418 // TemplateURLService::GenerateSearchURL() and |
| 419 // TemplateURLService::GenerateKeyword(). | 419 // TemplateURLService::GenerateKeyword(). |
| 420 void ResetKeywordIfNecessary(bool force); | 420 void ResetKeywordIfNecessary(bool force); |
| 421 | 421 |
| 422 // Invalidates cached values on this object and its child TemplateURLRefs. | |
| 423 void InvalidateCachedValues(); | |
| 424 | |
| 425 Profile* profile_; | 422 Profile* profile_; |
| 426 TemplateURLData data_; | 423 TemplateURLData data_; |
| 427 TemplateURLRef url_ref_; | 424 TemplateURLRef url_ref_; |
| 428 TemplateURLRef suggestions_url_ref_; | 425 TemplateURLRef suggestions_url_ref_; |
| 429 TemplateURLRef instant_url_ref_; | 426 TemplateURLRef instant_url_ref_; |
| 430 | 427 |
| 431 // TODO(sky): Add date last parsed OSD file. | 428 // TODO(sky): Add date last parsed OSD file. |
| 432 | 429 |
| 433 DISALLOW_COPY_AND_ASSIGN(TemplateURL); | 430 DISALLOW_COPY_AND_ASSIGN(TemplateURL); |
| 434 }; | 431 }; |
| 435 | 432 |
| 436 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 433 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
| OLD | NEW |