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_WEB_INTENTS_TABLE_H_ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_INTENTS_TABLE_H_ |
6 #define CHROME_BROWSER_WEBDATA_WEB_INTENTS_TABLE_H_ | 6 #define CHROME_BROWSER_WEBDATA_WEB_INTENTS_TABLE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... | |
31 // Intents are uniquely identified by the <service_url,action,type> tuple. | 31 // Intents are uniquely identified by the <service_url,action,type> tuple. |
32 class WebIntentsTable : public WebDatabaseTable { | 32 class WebIntentsTable : public WebDatabaseTable { |
33 public: | 33 public: |
34 WebIntentsTable(sql::Connection* db, sql::MetaTable* meta_table); | 34 WebIntentsTable(sql::Connection* db, sql::MetaTable* meta_table); |
35 virtual ~WebIntentsTable(); | 35 virtual ~WebIntentsTable(); |
36 | 36 |
37 // WebDatabaseTable implementation. | 37 // WebDatabaseTable implementation. |
38 virtual bool Init(); | 38 virtual bool Init(); |
39 virtual bool IsSyncable(); | 39 virtual bool IsSyncable(); |
40 | 40 |
41 // Adds a web intent to the WebIntents table. If intent already exists, | 41 // Adds a web intent service to the WebIntents table. If service |
42 // replaces it. | 42 // already exists, replaces it. |
43 bool SetWebIntent(const WebIntentServiceData& intent); | 43 bool SetWebIntent(const WebIntentServiceData& intent); |
44 | 44 |
45 // Retrieve all intents from WebIntents table that match |action|. | 45 // Retrieve all services from WebIntents table that match |action|. |
James Hawkins
2011/10/26 23:50:06
s/Retrieve/Retrieves/ here and elsewhere.
Greg Billock
2011/10/29 00:03:19
Done.
| |
46 bool GetWebIntents(const string16& action, | 46 bool GetWebIntents(const string16& action, |
47 std::vector<WebIntentServiceData>* intents); | 47 std::vector<WebIntentServiceData>* intents); |
48 | 48 |
49 // Retrieve all intents from WebIntents table. | 49 // Retrieve all services from WebIntents table that match |service_url|. |
50 bool GetWebIntentsForURL(const string16& service_url, | |
51 std::vector<WebIntentServiceData>* intents); | |
52 | |
53 // Retrieve all services from WebIntents table. | |
50 bool GetAllWebIntents(std::vector<WebIntentServiceData>* intents); | 54 bool GetAllWebIntents(std::vector<WebIntentServiceData>* intents); |
51 | 55 |
52 // Removes intent from WebIntents table - must match all parameters exactly. | 56 // Removes service from WebIntents table - must match all parameters exactly. |
53 bool RemoveWebIntent(const WebIntentServiceData& intent); | 57 bool RemoveWebIntent(const WebIntentServiceData& intent); |
54 | 58 |
55 private: | 59 private: |
56 DISALLOW_COPY_AND_ASSIGN(WebIntentsTable); | 60 DISALLOW_COPY_AND_ASSIGN(WebIntentsTable); |
57 }; | 61 }; |
58 | 62 |
59 #endif // CHROME_BROWSER_WEBDATA_WEB_INTENTS_TABLE_H_ | 63 #endif // CHROME_BROWSER_WEBDATA_WEB_INTENTS_TABLE_H_ |
OLD | NEW |