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

Side by Side Diff: chrome/browser/webdata/keyword_table.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
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_WEBDATA_KEYWORD_TABLE_H_ 5 #ifndef CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_
6 #define CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ 6 #define CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // suggest_url 42 // suggest_url
43 // prepopulate_id See TemplateURL::prepopulate_id. 43 // prepopulate_id See TemplateURL::prepopulate_id.
44 // autogenerate_keyword 44 // autogenerate_keyword
45 // logo_id See TemplateURL::logo_id 45 // logo_id See TemplateURL::logo_id
46 // created_by_policy See TemplateURL::created_by_policy. This was added 46 // created_by_policy See TemplateURL::created_by_policy. This was added
47 // in version 26. 47 // in version 26.
48 // instant_url See TemplateURL::instant_url. This was added 48 // instant_url See TemplateURL::instant_url. This was added
49 // in version 29. 49 // in version 29.
50 // last_modified See TemplateURL::last_modified. This was added in 50 // last_modified See TemplateURL::last_modified. This was added in
51 // version 38. 51 // version 38.
52 // sync_guid See TemplateURL::sync_guid. This was added in
53 // version 39.
52 // 54 //
53 class KeywordTable : public WebDatabaseTable { 55 class KeywordTable : public WebDatabaseTable {
54 public: 56 public:
55 KeywordTable(sql::Connection* db, sql::MetaTable* meta_table) 57 KeywordTable(sql::Connection* db, sql::MetaTable* meta_table)
56 : WebDatabaseTable(db, meta_table) {} 58 : WebDatabaseTable(db, meta_table) {}
57 virtual ~KeywordTable(); 59 virtual ~KeywordTable();
58 virtual bool Init(); 60 virtual bool Init();
59 virtual bool IsSyncable(); 61 virtual bool IsSyncable();
60 62
61 // Adds a new keyword, updating the id field on success. 63 // Adds a new keyword, updating the id field on success.
(...skipping 21 matching lines...) Expand all
83 bool SetBuitinKeywordVersion(int version); 85 bool SetBuitinKeywordVersion(int version);
84 int GetBuitinKeywordVersion(); 86 int GetBuitinKeywordVersion();
85 87
86 // Table migration functions. 88 // Table migration functions.
87 bool MigrateToVersion21AutoGenerateKeywordColumn(); 89 bool MigrateToVersion21AutoGenerateKeywordColumn();
88 bool MigrateToVersion25AddLogoIDColumn(); 90 bool MigrateToVersion25AddLogoIDColumn();
89 bool MigrateToVersion26AddCreatedByPolicyColumn(); 91 bool MigrateToVersion26AddCreatedByPolicyColumn();
90 bool MigrateToVersion28SupportsInstantColumn(); 92 bool MigrateToVersion28SupportsInstantColumn();
91 bool MigrateToVersion29InstantUrlToSupportsInstant(); 93 bool MigrateToVersion29InstantUrlToSupportsInstant();
92 bool MigrateToVersion38AddLastModifiedColumn(); 94 bool MigrateToVersion38AddLastModifiedColumn();
95 bool MigrateToVersion39AddSyncGUIDColumn();
93 96
94 private: 97 private:
95 DISALLOW_COPY_AND_ASSIGN(KeywordTable); 98 DISALLOW_COPY_AND_ASSIGN(KeywordTable);
96 }; 99 };
97 100
98 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ 101 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/protocol/search_engine_specifics.proto ('k') | chrome/browser/webdata/keyword_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698