| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 COMPONENTS_PAYMENTS_ANDROID_WEB_APP_MANIFEST_SECTION_TABLE_H_ | 5 #ifndef COMPONENTS_PAYMENTS_ANDROID_WEB_APP_MANIFEST_SECTION_TABLE_H_ |
| 6 #define COMPONENTS_PAYMENTS_ANDROID_WEB_APP_MANIFEST_SECTION_TABLE_H_ | 6 #define COMPONENTS_PAYMENTS_ANDROID_WEB_APP_MANIFEST_SECTION_TABLE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // Retrieves the WebAppManifestSectionTable* owned by |db|. | 34 // Retrieves the WebAppManifestSectionTable* owned by |db|. |
| 35 static WebAppManifestSectionTable* FromWebDatabase(WebDatabase* db); | 35 static WebAppManifestSectionTable* FromWebDatabase(WebDatabase* db); |
| 36 | 36 |
| 37 // WebDatabaseTable: | 37 // WebDatabaseTable: |
| 38 WebDatabaseTable::TypeKey GetTypeKey() const override; | 38 WebDatabaseTable::TypeKey GetTypeKey() const override; |
| 39 bool CreateTablesIfNecessary() override; | 39 bool CreateTablesIfNecessary() override; |
| 40 bool IsSyncable() override; | 40 bool IsSyncable() override; |
| 41 bool MigrateToVersion(int version, bool* update_compatible_version) override; | 41 bool MigrateToVersion(int version, bool* update_compatible_version) override; |
| 42 | 42 |
| 43 // Adds the web app |*manifest|. Note that the previous web app manifest will | 43 // Adds the web app |manifest|. Note that the previous web app manifest will |
| 44 // be deleted. | 44 // be deleted. |
| 45 bool AddWebAppManifest(mojom::WebAppManifestSection* manifest); | 45 bool AddWebAppManifest( |
| 46 const std::vector<mojom::WebAppManifestSectionPtr>& manifest); |
| 46 | 47 |
| 47 // Gets manifest of the |web_app|. Returns nullptr if no manifest exists for | 48 // Gets manifest of the |web_app|. Returns empty vector if no manifest exists |
| 48 // the |web_app|. | 49 // for the |web_app|. |
| 49 mojom::WebAppManifestSectionPtr GetWebAppManifest(const std::string& web_app); | 50 std::vector<mojom::WebAppManifestSectionPtr> GetWebAppManifest( |
| 51 const std::string& web_app); |
| 50 | 52 |
| 51 private: | 53 private: |
| 52 DISALLOW_COPY_AND_ASSIGN(WebAppManifestSectionTable); | 54 DISALLOW_COPY_AND_ASSIGN(WebAppManifestSectionTable); |
| 53 }; | 55 }; |
| 54 | 56 |
| 55 } // namespace payments | 57 } // namespace payments |
| 56 | 58 |
| 57 #endif // COMPONENTS_PAYMENTS_ANDROID_WEB_APP_MANIFEST_SECTION_TABLE_H_ | 59 #endif // COMPONENTS_PAYMENTS_ANDROID_WEB_APP_MANIFEST_SECTION_TABLE_H_ |
| OLD | NEW |