| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEB_APPLICATIONS_WEB_APP_H_ | 5 #ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ |
| 6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ | 6 #define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "chrome/browser/shell_integration.h" | 14 #include "chrome/browser/shell_integration.h" |
| 15 #include "chrome/common/web_apps.h" | 15 #include "chrome/common/web_apps.h" |
| 16 | 16 |
| 17 class Extension; | 17 class Extension; |
| 18 | 18 |
| 19 namespace web_app { | 19 namespace web_app { |
| 20 | 20 |
| 21 // Gets the user data directory for given web app. The path for the directory is | 21 // Returns data directory for given web app. The path for the directory is |
| 22 // based on |extension_id|. If |extension_id| is empty then |url| is used | 22 // based on |extension_id|. If |extension_id| is empty then |url| is used |
| 23 // to construct a unique ID. | 23 // to construct a unique ID. |
| 24 FilePath GetWebAppDataDirectory(const FilePath& profile_path, | 24 FilePath GetWebAppDataDirectory(const FilePath& profile_path, |
| 25 const std::string& extension_id, | 25 const std::string& extension_id, |
| 26 const GURL& url); | 26 const GURL& url); |
| 27 | 27 |
| 28 // Gets the user data directory to use for |extension| located inside | 28 // Gets the user data directory to use for |extension| located inside |
| 29 // |profile_path|. | 29 // |profile_path|. |
| 30 FilePath GetWebAppDataDirectory(const FilePath& profile_path, | 30 FilePath GetWebAppDataDirectory(const FilePath& profile_path, |
| 31 const Extension& extension); | 31 const Extension& extension); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 // Sanitizes |name| and returns a version of it that is safe to use as an | 87 // Sanitizes |name| and returns a version of it that is safe to use as an |
| 88 // on-disk file name . | 88 // on-disk file name . |
| 89 FilePath GetSanitizedFileName(const string16& name); | 89 FilePath GetSanitizedFileName(const string16& name); |
| 90 | 90 |
| 91 } // namespace internals | 91 } // namespace internals |
| 92 | 92 |
| 93 } // namespace web_app | 93 } // namespace web_app |
| 94 | 94 |
| 95 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ | 95 #endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_H_ |
| OLD | NEW |