Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: chrome/browser/search_engines/template_url.h

Issue 7396024: Adding a sync_guid field to TemplateURL. Adding appropriate database migration changes and tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Lint fix. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698