| 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_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 |
| 11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
| 12 #include "base/string16.h" |
| 12 #include "chrome/browser/webdata/web_database_table.h" | 13 #include "chrome/browser/webdata/web_database_table.h" |
| 13 #include "chrome/browser/search_engines/template_url_id.h" | 14 #include "chrome/browser/search_engines/template_url_id.h" |
| 14 | 15 |
| 15 class GURL; | 16 class GURL; |
| 16 class TemplateURL; | 17 class TemplateURL; |
| 17 | 18 |
| 18 namespace base { | 19 namespace base { |
| 19 class Time; | 20 class Time; |
| 20 } | 21 } |
| 21 | 22 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 72 |
| 72 // Loads the keywords into the specified vector. It's up to the caller to | 73 // Loads the keywords into the specified vector. It's up to the caller to |
| 73 // delete the returned objects. | 74 // delete the returned objects. |
| 74 // Returns true on success. | 75 // Returns true on success. |
| 75 bool GetKeywords(std::vector<TemplateURL*>* urls); | 76 bool GetKeywords(std::vector<TemplateURL*>* urls); |
| 76 | 77 |
| 77 // Updates the database values for the specified url. | 78 // Updates the database values for the specified url. |
| 78 // Returns true on success. | 79 // Returns true on success. |
| 79 bool UpdateKeyword(const TemplateURL& url); | 80 bool UpdateKeyword(const TemplateURL& url); |
| 80 | 81 |
| 82 // Returns short name of url with specified id. |
| 83 string16 GetKeywordShortName(int64 id); |
| 84 |
| 81 // ID (TemplateURL->id) of the default search provider. | 85 // ID (TemplateURL->id) of the default search provider. |
| 82 bool SetDefaultSearchProviderID(int64 id); | 86 bool SetDefaultSearchProviderID(int64 id); |
| 83 int64 GetDefaultSearchProviderID(); | 87 int64 GetDefaultSearchProviderID(); |
| 84 | 88 |
| 85 // Version of the built-in keywords. | 89 // Version of the built-in keywords. |
| 86 bool SetBuiltinKeywordVersion(int version); | 90 bool SetBuiltinKeywordVersion(int version); |
| 87 int GetBuiltinKeywordVersion(); | 91 int GetBuiltinKeywordVersion(); |
| 88 | 92 |
| 89 // Table migration functions. | 93 // Table migration functions. |
| 90 bool MigrateToVersion21AutoGenerateKeywordColumn(); | 94 bool MigrateToVersion21AutoGenerateKeywordColumn(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 104 // occurred (i.e. by third-party process trying to modify user settings). | 108 // occurred (i.e. by third-party process trying to modify user settings). |
| 105 bool SetDefaultSearchProviderBackupID(int64 id); | 109 bool SetDefaultSearchProviderBackupID(int64 id); |
| 106 | 110 |
| 107 // Sets signature for the backup field. | 111 // Sets signature for the backup field. |
| 108 bool SetDefaultSearchProviderBackupIDSignature(int64 id); | 112 bool SetDefaultSearchProviderBackupIDSignature(int64 id); |
| 109 | 113 |
| 110 DISALLOW_COPY_AND_ASSIGN(KeywordTable); | 114 DISALLOW_COPY_AND_ASSIGN(KeywordTable); |
| 111 }; | 115 }; |
| 112 | 116 |
| 113 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ | 117 #endif // CHROME_BROWSER_WEBDATA_KEYWORD_TABLE_H_ |
| OLD | NEW |