Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8657)

Unified Diff: chrome/browser/web_applications/web_app.h

Issue 9423048: Add user data dir field to Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/web_applications/web_app_ui.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/web_applications/web_app.h
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h
index 67c839e773f66c8ff032d72f025a325375590d68..4a6367fd7c65ece46c8d4e48f12177802a4f89e2 100644
--- a/chrome/browser/web_applications/web_app.h
+++ b/chrome/browser/web_applications/web_app.h
@@ -14,8 +14,22 @@
#include "chrome/browser/shell_integration.h"
#include "chrome/common/web_apps.h"
+class Extension;
+
namespace web_app {
+// Gets the user data directory for given web app. The path for the directory is
+// based on |extension_id|. If |extension_id| is empty then |url| is used
+// to construct a unique ID.
+FilePath GetWebAppDataDirectory(const FilePath& profile_path,
+ const std::string& extension_id,
+ const GURL& url);
+
+// Gets the user data directory to use for |extension| located inside
+// |profile_path|.
+FilePath GetWebAppDataDirectory(const FilePath& profile_path,
+ const Extension& extension);
+
// Compute a deterministic name based on data in the shortcut_info.
std::string GenerateApplicationNameFromInfo(
const ShellIntegration::ShortcutInfo& shortcut_info);
@@ -43,9 +57,6 @@ void CreateShortcut(
// Returns true if given url is a valid web app url.
bool IsValidUrl(const GURL& url);
-// Returns data dir for web apps for given profile path.
-FilePath GetDataDir(const FilePath& profile_path);
-
#if defined(TOOLKIT_VIEWS)
// Extracts icons info from web app data. Take only square shaped icons and
// sort them from smallest to largest.
@@ -67,9 +78,6 @@ namespace internals {
bool CheckAndSaveIcon(const FilePath& icon_file, const SkBitmap& image);
#endif
-FilePath GetWebAppDataDirectory(const FilePath& root_dir,
- const ShellIntegration::ShortcutInfo& info);
-
// Does the actual job of creating a shortcut (see CreateShortcut() above).
// This must be called on the file thread.
void CreateShortcutTask(const FilePath& web_app_path,
« no previous file with comments | « chrome/browser/ui/web_applications/web_app_ui.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698