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

Side by Side Diff: chrome/browser/webdata/web_intents_table.h

Issue 7461089: First implementation of web intents table. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_WEBDATA_WEB_INTENTS_TABLE_H_
6 #define CHROME_BROWSER_WEBDATA_WEB_INTENTS_TABLE_H_
7 #pragma once
8
9 #include "base/string16.h"
James Hawkins 2011/07/26 20:21:53 #include "base/basictypes.h" for DISALLOW_COPY_AND
groby-ooo-7-16 2011/07/26 21:38:37 Done.
10 #include "googleurl/src/gurl.h"
11 #include "chrome/browser/webdata/web_database_table.h"
12
13 #include <vector>
14
15 // Describes the relevant elements of a WebIntent.
James Hawkins 2011/07/26 20:21:53 Add a TODO noting this should likely be moved once
groby-ooo-7-16 2011/07/26 21:38:37 Done.
16 class WebIntent {
James Hawkins 2011/07/26 20:21:53 Use a struct.
James Hawkins 2011/07/26 20:46:18 s/WebIntent/WebIntentData/
groby-ooo-7-16 2011/07/26 21:38:37 Done.
groby-ooo-7-16 2011/07/26 21:38:37 Done.
17 public:
18 string16 action;
James Hawkins 2011/07/26 20:21:53 Document the members.
groby-ooo-7-16 2011/07/26 21:38:37 Done.
19 string16 type;
20 GURL service_url;
James Hawkins 2011/07/26 20:21:53 Would be nice to align the ordering of the members
groby-ooo-7-16 2011/07/26 21:38:37 Done.
21 };
22
23 // This class manages the WebIntents tables within the SQLite database passed
James Hawkins 2011/07/26 20:21:53 For now, s/tables/table/.
groby-ooo-7-16 2011/07/26 21:38:37 Done.
24 // to the constructor. It expects the following schema:
25 //
26 // web_intents
27 // service_url URL for service invocation.
28 // action Name of action provided by the service.
29 // type MIME type of data accepted by the service.
30 //
31 class WebIntentsTable : public WebDatabaseTable {
32 public:
33 WebIntentsTable(sql::Connection* db, sql::MetaTable* meta_table)
34 : WebDatabaseTable(db, meta_table) {}
James Hawkins 2011/07/26 20:21:53 Move implementation to source file, here and elsew
groby-ooo-7-16 2011/07/26 21:38:37 Done.
35 virtual ~WebIntentsTable() {}
36
37 virtual bool Init();
James Hawkins 2011/07/26 20:21:53 // WebDatabaseTable implementation.
groby-ooo-7-16 2011/07/26 21:38:37 Done.
38 virtual bool IsSyncable();
39
40 bool SetWebIntent(const string16& action,
James Hawkins 2011/07/26 20:21:53 Document these methods.
groby-ooo-7-16 2011/07/26 21:38:37 Done.
41 const string16& type,
42 const GURL& service_url);
43
44 bool GetWebIntents(const string16& action,
45 std::vector<WebIntent>& intents);
James Hawkins 2011/07/26 20:21:53 Hmm, if we're modifying |intents|, this should be
groby-ooo-7-16 2011/07/26 21:38:37 Done.
46
47 bool RemoveWebIntent(const string16& action,
48 const string16& type,
49 const GURL& service_url);
50
51 private:
52 bool InitWebIntentsTable();
53
54 DISALLOW_COPY_AND_ASSIGN(WebIntentsTable);
55 };
56
57 #endif // CHROME_BROWSER_WEBDATA_WEB_INTENTS_TABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698