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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
7 7
8 #include "base/platform_file.h" 8 #include "base/platform_file.h"
9 #include "chrome/browser/extensions/api/developer_private/entry_picker.h" 9 #include "chrome/browser/extensions/api/developer_private/entry_picker.h"
10 #include "chrome/browser/extensions/api/file_system/file_system_api.h" 10 #include "chrome/browser/extensions/api/file_system/file_system_api.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadProjectToSyncfs", 376 DECLARE_EXTENSION_FUNCTION("developerPrivate.loadProjectToSyncfs",
377 DEVELOPERPRIVATE_LOADPROJECTTOSYNCFS); 377 DEVELOPERPRIVATE_LOADPROJECTTOSYNCFS);
378 378
379 DeveloperPrivateLoadProjectToSyncfsFunction(); 379 DeveloperPrivateLoadProjectToSyncfsFunction();
380 380
381 protected: 381 protected:
382 virtual ~DeveloperPrivateLoadProjectToSyncfsFunction(); 382 virtual ~DeveloperPrivateLoadProjectToSyncfsFunction();
383 383
384 // ExtensionFunction 384 // ExtensionFunction
385 virtual bool RunImpl() OVERRIDE; 385 virtual bool RunImpl() OVERRIDE;
386
387 void CopyFolder(const base::FilePath::StringType& project_name);
388
389 void CopyFiles(const std::vector<base::FilePath>& paths);
390
391 void CopyFilesCallback(const base::PlatformFileError result);
392
393 private:
394 // Number of pending copy files callbacks.
395 // It should only be modified on the IO Thread.
396 int pendingCallbacksCount_;
397
398 // True only when all the copyFiles job are successful.
399 // It should only be modified on the IO thread.
400 bool success_;
401
402 scoped_refptr<fileapi::FileSystemContext> context_;
386 }; 403 };
387 404
388 class DeveloperPrivateGetProjectsInfoFunction : public AsyncExtensionFunction { 405 class DeveloperPrivateGetProjectsInfoFunction : public AsyncExtensionFunction {
389 public: 406 public:
390 DECLARE_EXTENSION_FUNCTION("developerPrivate.getProjectsInfo", 407 DECLARE_EXTENSION_FUNCTION("developerPrivate.getProjectsInfo",
391 DEVELOPERPRIVATE_GETPROJECTSINFO); 408 DEVELOPERPRIVATE_GETPROJECTSINFO);
392 409
393 DeveloperPrivateGetProjectsInfoFunction(); 410 DeveloperPrivateGetProjectsInfoFunction();
394 411
395 protected: 412 protected:
(...skipping 12 matching lines...) Expand all
408 425
409 DeveloperPrivateLoadProjectFunction(); 426 DeveloperPrivateLoadProjectFunction();
410 427
411 protected: 428 protected:
412 virtual ~DeveloperPrivateLoadProjectFunction(); 429 virtual ~DeveloperPrivateLoadProjectFunction();
413 430
414 // ExtensionFunction 431 // ExtensionFunction
415 virtual bool RunImpl() OVERRIDE; 432 virtual bool RunImpl() OVERRIDE;
416 }; 433 };
417 434
418
419
420 } // namespace api 435 } // namespace api
421 436
422 } // namespace extensions 437 } // namespace extensions
423 438
424 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ 439 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698