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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 } | 418 } |
419 std::vector<string16> languages() const { return languages_; } | 419 std::vector<string16> languages() const { return languages_; } |
420 | 420 |
421 // Date this keyword was created. | 421 // Date this keyword was created. |
422 // | 422 // |
423 // NOTE: this may be 0, which indicates the keyword was created before we | 423 // NOTE: this may be 0, which indicates the keyword was created before we |
424 // started tracking creation time. | 424 // started tracking creation time. |
425 void set_date_created(base::Time time) { date_created_ = time; } | 425 void set_date_created(base::Time time) { date_created_ = time; } |
426 base::Time date_created() const { return date_created_; } | 426 base::Time date_created() const { return date_created_; } |
427 | 427 |
| 428 // The last time this keyword was modified by a user, since creation. |
| 429 // |
| 430 // NOTE: Like date_created above, this may be 0. |
| 431 void set_last_modified(base::Time time) { last_modified_ = time; } |
| 432 base::Time last_modified() const { return last_modified_; } |
| 433 |
428 // True if this TemplateURL was automatically created by the administrator via | 434 // True if this TemplateURL was automatically created by the administrator via |
429 // group policy. | 435 // group policy. |
430 void set_created_by_policy(bool created_by_policy) { | 436 void set_created_by_policy(bool created_by_policy) { |
431 created_by_policy_ = created_by_policy; | 437 created_by_policy_ = created_by_policy; |
432 } | 438 } |
433 bool created_by_policy() const { return created_by_policy_; } | 439 bool created_by_policy() const { return created_by_policy_; } |
434 | 440 |
435 // Number of times this keyword has been explicitly used to load a URL. We | 441 // Number of times this keyword has been explicitly used to load a URL. We |
436 // don't increment this for uses as the "default search engine" since that's | 442 // don't increment this for uses as the "default search engine" since that's |
437 // not really "explicit" usage and incrementing would result in pinning the | 443 // not really "explicit" usage and incrementing would result in pinning the |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 // is used to avoid multiple attempts if | 509 // is used to avoid multiple attempts if |
504 // generating a keyword failed. | 510 // generating a keyword failed. |
505 bool show_in_default_list_; | 511 bool show_in_default_list_; |
506 bool safe_for_autoreplace_; | 512 bool safe_for_autoreplace_; |
507 std::vector<ImageRef> image_refs_; | 513 std::vector<ImageRef> image_refs_; |
508 std::vector<string16> languages_; | 514 std::vector<string16> languages_; |
509 // List of supported input encodings. | 515 // List of supported input encodings. |
510 std::vector<std::string> input_encodings_; | 516 std::vector<std::string> input_encodings_; |
511 TemplateURLID id_; | 517 TemplateURLID id_; |
512 base::Time date_created_; | 518 base::Time date_created_; |
| 519 base::Time last_modified_; |
513 bool created_by_policy_; | 520 bool created_by_policy_; |
514 int usage_count_; | 521 int usage_count_; |
515 SearchEngineType search_engine_type_; | 522 SearchEngineType search_engine_type_; |
516 int logo_id_; | 523 int logo_id_; |
517 int prepopulate_id_; | 524 int prepopulate_id_; |
518 | 525 |
519 // TODO(sky): Add date last parsed OSD file. | 526 // TODO(sky): Add date last parsed OSD file. |
520 }; | 527 }; |
521 | 528 |
522 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 529 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
OLD | NEW |