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