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_EXTENSIONS_CONVERT_WEB_APP_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 // <year>.<month>.<day>.<fraction> | 27 // <year>.<month>.<day>.<fraction> |
28 // | 28 // |
29 // fraction is represented as a number between 0 and 2^16-1. Each unit is | 29 // fraction is represented as a number between 0 and 2^16-1. Each unit is |
30 // ~1.32 seconds. | 30 // ~1.32 seconds. |
31 std::string ConvertTimeToExtensionVersion(const base::Time& time); | 31 std::string ConvertTimeToExtensionVersion(const base::Time& time); |
32 | 32 |
33 // Wraps the specified web app in an extension. The extension is created | 33 // Wraps the specified web app in an extension. The extension is created |
34 // unpacked in the system temp dir. Returns a valid extension that the caller | 34 // unpacked in the system temp dir. Returns a valid extension that the caller |
35 // should take ownership on success, or NULL and |error| on failure. | 35 // should take ownership on success, or NULL and |error| on failure. |
36 // | 36 // |
37 // NOTE: The app created is always marked as a bookmark app. | |
38 // NOTE: This function does file IO and should not be called on the UI thread. | 37 // NOTE: This function does file IO and should not be called on the UI thread. |
39 // NOTE: The caller takes ownership of the directory at extension->path() on the | 38 // NOTE: The caller takes ownership of the directory at extension->path() on the |
40 // returned object. | 39 // returned object. |
41 scoped_refptr<Extension> ConvertWebAppToExtension( | 40 scoped_refptr<Extension> ConvertWebAppToExtension( |
42 const WebApplicationInfo& web_app_info, | 41 const WebApplicationInfo& web_app_info, |
43 const base::Time& create_time, | 42 const base::Time& create_time, |
| 43 int creation_flags, |
44 const base::FilePath& extensions_dir); | 44 const base::FilePath& extensions_dir); |
45 | 45 |
46 } // namespace extensions | 46 } // namespace extensions |
47 | 47 |
48 #endif // CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_ | 48 #endif // CHROME_BROWSER_EXTENSIONS_CONVERT_WEB_APP_H_ |
OLD | NEW |