| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 | 481 |
| 482 // If this TemplateURL comes from prepopulated data the prepopulate_id is > 0. | 482 // If this TemplateURL comes from prepopulated data the prepopulate_id is > 0. |
| 483 // SetPrepopulateId also sets any TemplateURLRef's prepopulated flag to true | 483 // SetPrepopulateId also sets any TemplateURLRef's prepopulated flag to true |
| 484 // if |id| > 0 and false otherwise. | 484 // if |id| > 0 and false otherwise. |
| 485 void SetPrepopulateId(int id); | 485 void SetPrepopulateId(int id); |
| 486 int prepopulate_id() const { return prepopulate_id_; } | 486 int prepopulate_id() const { return prepopulate_id_; } |
| 487 | 487 |
| 488 std::string GetExtensionId() const; | 488 std::string GetExtensionId() const; |
| 489 bool IsExtensionKeyword() const; | 489 bool IsExtensionKeyword() const; |
| 490 | 490 |
| 491 std::string sync_guid() const { return sync_guid_; } |
| 492 void set_sync_guid(const std::string& guid) { sync_guid_ = guid; } |
| 493 |
| 491 private: | 494 private: |
| 492 friend void MergeEnginesFromPrepopulateData( | 495 friend void MergeEnginesFromPrepopulateData( |
| 493 PrefService* prefs, | 496 PrefService* prefs, |
| 494 WebDataService* service, | 497 WebDataService* service, |
| 495 std::vector<TemplateURL*>* template_urls, | 498 std::vector<TemplateURL*>* template_urls, |
| 496 const TemplateURL** default_search_provider); | 499 const TemplateURL** default_search_provider); |
| 497 friend class KeywordTable; | 500 friend class KeywordTable; |
| 498 friend class KeywordTableTest; | 501 friend class KeywordTableTest; |
| 499 friend class SearchHostToURLsMap; | 502 friend class SearchHostToURLsMap; |
| 500 friend class TemplateURLService; | 503 friend class TemplateURLService; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 527 // List of supported input encodings. | 530 // List of supported input encodings. |
| 528 std::vector<std::string> input_encodings_; | 531 std::vector<std::string> input_encodings_; |
| 529 TemplateURLID id_; | 532 TemplateURLID id_; |
| 530 base::Time date_created_; | 533 base::Time date_created_; |
| 531 base::Time last_modified_; | 534 base::Time last_modified_; |
| 532 bool created_by_policy_; | 535 bool created_by_policy_; |
| 533 int usage_count_; | 536 int usage_count_; |
| 534 SearchEngineType search_engine_type_; | 537 SearchEngineType search_engine_type_; |
| 535 int logo_id_; | 538 int logo_id_; |
| 536 int prepopulate_id_; | 539 int prepopulate_id_; |
| 540 // The primary unique identifier for Sync. This is only set on TemplateURLs |
| 541 // that have been associated with Sync. |
| 542 std::string sync_guid_; |
| 537 | 543 |
| 538 // TODO(sky): Add date last parsed OSD file. | 544 // TODO(sky): Add date last parsed OSD file. |
| 539 }; | 545 }; |
| 540 | 546 |
| 541 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 547 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
| OLD | NEW |