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

Unified Diff: chrome/browser/extensions/api/developer_private/developer_private_api.h

Issue 14232018: Add API to load project from localfs into syncfs. (Closed) Base URL: http://git.chromium.org/chromium/src.git@load_api
Patch Set: . Created 7 years, 8 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
Index: chrome/browser/extensions/api/developer_private/developer_private_api.h
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h
index 986db447b8ea8236ad0b485deef9b20aeea28a36..ecb52409c321913547f0ca6226e749c8c05f9202 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.h
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h
@@ -37,6 +37,7 @@ namespace developer_private {
struct ItemInfo;
struct ItemInspectView;
+struct ProjectInfo;
}
@@ -47,6 +48,7 @@ struct ItemInspectView;
namespace developer = extensions::api::developer_private;
typedef std::vector<linked_ptr<developer::ItemInfo> > ItemInfoList;
+typedef std::vector<linked_ptr<developer::ProjectInfo> > ProjectInfoList;
typedef std::vector<linked_ptr<developer::ItemInspectView> >
ItemInspectViewList;
@@ -368,6 +370,61 @@ class DeveloperPrivateExportSyncfsFolderToLocalfsFunction
scoped_refptr<fileapi::FileSystemContext> context_;
};
+class DeveloperPrivateLoadProjectToSyncfsFunction
+ : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.loadProjectToSyncfs",
+ DEVELOPERPRIVATE_LOADPROJECTTOSYNCFS);
+
+ DeveloperPrivateLoadProjectToSyncfsFunction();
+
+ protected:
+ virtual ~DeveloperPrivateLoadProjectToSyncfsFunction();
+
+ // ExtensionFunction
+ virtual bool RunImpl() OVERRIDE;
+
+ void CopyFolder(const base::FilePath::StringType& project_name);
+
+ void CopyFiles(const std::vector<base::FilePath>& paths);
+
+ void CopyFilesCallback(const base::PlatformFileError result);
+
+ scoped_refptr<fileapi::FileSystemContext> context_;
+};
+
+class DeveloperPrivateGetProjectsInfoFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.getProjectsInfo",
+ DEVELOPERPRIVATE_GETPROJECTSINFO);
+
+ DeveloperPrivateGetProjectsInfoFunction();
+
+ protected:
+ virtual ~DeveloperPrivateGetProjectsInfoFunction();
+
+ void ReadFolder();
+
+ // ExtensionFunction
+ virtual bool RunImpl() OVERRIDE;
+};
+
+class DeveloperPrivateLoadProjectFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("developerPrivate.loadProject",
+ DEVELOPERPRIVATE_LOADPROJECT);
+
+ DeveloperPrivateLoadProjectFunction();
+
+ protected:
+ virtual ~DeveloperPrivateLoadProjectFunction();
+
+ // ExtensionFunction
+ virtual bool RunImpl() OVERRIDE;
+};
+
+
+
kinuko 2013/04/18 08:15:12 nit: extra empty lines
Gaurav 2013/04/18 23:08:46 Done.
} // namespace api
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698