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_APPS_TABLE_H_ | 5 #ifndef CHROME_BROWSER_WEBDATA_WEB_APPS_TABLE_H_ |
6 #define CHROME_BROWSER_WEBDATA_WEB_APPS_TABLE_H_ | 6 #define CHROME_BROWSER_WEBDATA_WEB_APPS_TABLE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // height Height of the image. | 28 // height Height of the image. |
29 // image PNG encoded image data. | 29 // image PNG encoded image data. |
30 // | 30 // |
31 class WebAppsTable : public WebDatabaseTable { | 31 class WebAppsTable : public WebDatabaseTable { |
32 public: | 32 public: |
33 WebAppsTable(sql::Connection* db, sql::MetaTable* meta_table) | 33 WebAppsTable(sql::Connection* db, sql::MetaTable* meta_table) |
34 : WebDatabaseTable(db, meta_table) {} | 34 : WebDatabaseTable(db, meta_table) {} |
35 virtual ~WebAppsTable() {} | 35 virtual ~WebAppsTable() {} |
36 virtual bool Init() OVERRIDE; | 36 virtual bool Init() OVERRIDE; |
37 virtual bool IsSyncable() OVERRIDE; | 37 virtual bool IsSyncable() OVERRIDE; |
| 38 virtual bool MigrateToVersion(int version, |
| 39 const std::string& app_locale, |
| 40 bool* update_compatible_version) OVERRIDE; |
38 | 41 |
39 bool SetWebAppImage(const GURL& url, const SkBitmap& image); | 42 bool SetWebAppImage(const GURL& url, const SkBitmap& image); |
40 | 43 |
41 // Returns true if all images are retrieved. Returns false if there is a | 44 // Returns true if all images are retrieved. Returns false if there is a |
42 // database error. In this case, the state of images is undefined; it may have | 45 // database error. In this case, the state of images is undefined; it may have |
43 // partial results or no results from the call. | 46 // partial results or no results from the call. |
44 bool GetWebAppImages(const GURL& url, std::vector<SkBitmap>* images); | 47 bool GetWebAppImages(const GURL& url, std::vector<SkBitmap>* images); |
45 | 48 |
46 bool SetWebAppHasAllImages(const GURL& url, bool has_all_images); | 49 bool SetWebAppHasAllImages(const GURL& url, bool has_all_images); |
47 bool GetWebAppHasAllImages(const GURL& url); | 50 bool GetWebAppHasAllImages(const GURL& url); |
48 | 51 |
49 bool RemoveWebApp(const GURL& url); | 52 bool RemoveWebApp(const GURL& url); |
50 | 53 |
51 private: | 54 private: |
52 bool InitWebAppIconsTable(); | 55 bool InitWebAppIconsTable(); |
53 bool InitWebAppsTable(); | 56 bool InitWebAppsTable(); |
54 | 57 |
55 DISALLOW_COPY_AND_ASSIGN(WebAppsTable); | 58 DISALLOW_COPY_AND_ASSIGN(WebAppsTable); |
56 }; | 59 }; |
57 | 60 |
58 #endif // CHROME_BROWSER_WEBDATA_WEB_APPS_TABLE_H_ | 61 #endif // CHROME_BROWSER_WEBDATA_WEB_APPS_TABLE_H_ |
OLD | NEW |