Chromium Code Reviews| Index: chrome/browser/webdata/web_intents_table.h |
| diff --git a/chrome/browser/webdata/web_intents_table.h b/chrome/browser/webdata/web_intents_table.h |
| index beb0c19acbbc708ec5abcc300ecf8291c8bd3d29..b701de8f2660e1cda360b0ecb7529c17a965f80b 100644 |
| --- a/chrome/browser/webdata/web_intents_table.h |
| +++ b/chrome/browser/webdata/web_intents_table.h |
| @@ -19,6 +19,8 @@ class Connection; |
| class MetaTable; |
| } |
| +class DefaultIntentService; |
| + |
| // This class manages the WebIntents table within the SQLite database passed |
| // to the constructor. It expects the following schema: |
| // |
| @@ -26,8 +28,25 @@ class MetaTable; |
| // service_url URL for service invocation. |
| // action Name of action provided by the service. |
| // type MIME type of data accepted by the service. |
| +// title Title for the service page |
| +// disposition Either 'window' or 'inline' disposition. |
| +// |
| +// Web Intents Services are uniquely identified by the <service_url,action,type> |
| +// tuple. |
| +// |
| +// Also manages the defaults table: |
| +// |
| +// web_intents_defaults |
| +// action Intent action for this default. |
| +// type Intent type for this default. |
| +// url_prefix URL prefix for which the default is invoked. |
|
groby-ooo-7-16
2012/02/06 18:34:53
I'm not sure what the url_prefix stands for? The p
Greg Billock
2012/02/07 00:45:06
I'm not totally sure at this point. I want to leav
|
| +// user_date Epoch time when the user made this default. |
|
James Hawkins
2012/02/05 05:21:51
What is |user_date| used for?
Greg Billock
2012/02/07 00:45:06
Basically just to say that this is a default the u
|
| +// suppression Set if the default is (temporarily) suppressed. |
| +// service_url The URL of a service in the web_intents table. |
|
James Hawkins
2012/02/05 05:21:51
Why do we need two columns for URL?
Greg Billock
2012/02/07 00:45:06
I want to store extension defaults separately from
|
| +// extension_url The URL for an extension handling intents. |
| +// |
| +// The defaults are scoped by action, then type, then url prefix. |
| // |
| -// Intents are uniquely identified by the <service_url,action,type> tuple. |
| class WebIntentsTable : public WebDatabaseTable { |
| public: |
| WebIntentsTable(sql::Connection* db, sql::MetaTable* meta_table); |
| @@ -59,6 +78,18 @@ class WebIntentsTable : public WebDatabaseTable { |
| // exactly. |
| bool RemoveWebIntentService(const webkit_glue::WebIntentServiceData& service); |
| + // Get the default service to be used for the given intent invocation. |
| + // If any overlapping defaults are found, they're placed in |
| + // |default_services|, otherwise, it is untouched. |
| + // Returns true if the method runs successfully, false on database error. |
| + bool GetDefaultServices(const string16& action, |
| + const string16& type, |
| + const std::string& client_url, |
| + std::vector<DefaultIntentService>* default_services); |
| + |
| + // Set a default service to be used on given intent invocations. |
| + bool SetDefaultService(const DefaultIntentService& default_service); |
| + |
| private: |
| DISALLOW_COPY_AND_ASSIGN(WebIntentsTable); |
| }; |