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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system.h

Issue 9834091: gdata: Fix issue with copying hosted documents out from Docs folder. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.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_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
7 7
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 GDataFileProperties* properties) = 0; 342 GDataFileProperties* properties) = 0;
343 343
344 // Returns the tmp sub-directory under gdata cache directory, i.e. 344 // Returns the tmp sub-directory under gdata cache directory, i.e.
345 // <user_profile_dir>/GCache/v1/tmp 345 // <user_profile_dir>/GCache/v1/tmp
346 virtual FilePath GetGDataCacheTmpDirectory() const = 0; 346 virtual FilePath GetGDataCacheTmpDirectory() const = 0;
347 347
348 // Returns the tmp downloads sub-directory under gdata cache directory, i.e. 348 // Returns the tmp downloads sub-directory under gdata cache directory, i.e.
349 // <user_profile_dir>/GCache/v1/tmp/downloads/ 349 // <user_profile_dir>/GCache/v1/tmp/downloads/
350 virtual FilePath GetGDataTempDownloadFolderPath() const = 0; 350 virtual FilePath GetGDataTempDownloadFolderPath() const = 0;
351 351
352 // Returns the tmp documents sub-directory under gdata cache directory, i.e.
353 // <user_profile_dir>/GCache/v1/tmp/documents/
354 virtual FilePath GetGDataTempDocumentFolderPath() const = 0;
355
352 // Returns the pinned sub-directory under gdata cache directory, i.e. 356 // Returns the pinned sub-directory under gdata cache directory, i.e.
353 // <user_profile_dir>/GCache/v1/pinned 357 // <user_profile_dir>/GCache/v1/pinned
354 virtual FilePath GetGDataCachePinnedDirectory() const = 0; 358 virtual FilePath GetGDataCachePinnedDirectory() const = 0;
355 359
356 // Returns the pinned sub-directory under gdata cache directory, i.e. 360 // Returns the pinned sub-directory under gdata cache directory, i.e.
357 // <user_profile_dir>/GCache/v1/pinned 361 // <user_profile_dir>/GCache/v1/pinned
358 virtual FilePath GetGDataCachePersistentDirectory() const = 0; 362 virtual FilePath GetGDataCachePersistentDirectory() const = 0;
359 363
360 // Returns absolute path of the file if it were cached or to be cached. 364 // Returns absolute path of the file if it were cached or to be cached.
361 virtual FilePath GetCacheFilePath( 365 virtual FilePath GetCacheFilePath(
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 GDataOperationRegistry::Observer* observer) OVERRIDE; 432 GDataOperationRegistry::Observer* observer) OVERRIDE;
429 virtual void RemoveOperationObserver( 433 virtual void RemoveOperationObserver(
430 GDataOperationRegistry::Observer* observer) OVERRIDE; 434 GDataOperationRegistry::Observer* observer) OVERRIDE;
431 virtual void GetCacheState(const std::string& resource_id, 435 virtual void GetCacheState(const std::string& resource_id,
432 const std::string& md5, 436 const std::string& md5,
433 const GetCacheStateCallback& callback) OVERRIDE; 437 const GetCacheStateCallback& callback) OVERRIDE;
434 virtual bool GetFileInfoFromPath(const FilePath& gdata_file_path, 438 virtual bool GetFileInfoFromPath(const FilePath& gdata_file_path,
435 GDataFileProperties* properties) OVERRIDE; 439 GDataFileProperties* properties) OVERRIDE;
436 virtual FilePath GetGDataCacheTmpDirectory() const OVERRIDE; 440 virtual FilePath GetGDataCacheTmpDirectory() const OVERRIDE;
437 virtual FilePath GetGDataTempDownloadFolderPath() const OVERRIDE; 441 virtual FilePath GetGDataTempDownloadFolderPath() const OVERRIDE;
442 virtual FilePath GetGDataTempDocumentFolderPath() const OVERRIDE;
438 virtual FilePath GetGDataCachePinnedDirectory() const OVERRIDE; 443 virtual FilePath GetGDataCachePinnedDirectory() const OVERRIDE;
439 virtual FilePath GetGDataCachePersistentDirectory() const OVERRIDE; 444 virtual FilePath GetGDataCachePersistentDirectory() const OVERRIDE;
440 virtual FilePath GetCacheFilePath( 445 virtual FilePath GetCacheFilePath(
441 const std::string& resource_id, 446 const std::string& resource_id,
442 const std::string& md5, 447 const std::string& md5,
443 GDataRootDirectory::CacheSubDirectoryType sub_dir_type, 448 GDataRootDirectory::CacheSubDirectoryType sub_dir_type,
444 CachedFileOrigin file_orign) const OVERRIDE; 449 CachedFileOrigin file_orign) const OVERRIDE;
445 virtual void GetAvailableSpace( 450 virtual void GetAvailableSpace(
446 const GetAvailableSpaceCallback& callback) OVERRIDE; 451 const GetAvailableSpaceCallback& callback) OVERRIDE;
447 virtual void AddUploadedFile(const FilePath& virtual_dir_path, 452 virtual void AddUploadedFile(const FilePath& virtual_dir_path,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 void UnsafeFindFileByPath(const FilePath& file_path, 596 void UnsafeFindFileByPath(const FilePath& file_path,
592 FindFileDelegate* delegate); 597 FindFileDelegate* delegate);
593 598
594 // Converts document feed from gdata service into DirectoryInfo. On failure, 599 // Converts document feed from gdata service into DirectoryInfo. On failure,
595 // returns NULL and fills in |error| with an appropriate value. 600 // returns NULL and fills in |error| with an appropriate value.
596 GDataDirectory* ParseGDataFeed(GDataErrorCode status, 601 GDataDirectory* ParseGDataFeed(GDataErrorCode status,
597 base::Value* data, 602 base::Value* data,
598 base::PlatformFileError *error); 603 base::PlatformFileError *error);
599 604
600 // Creates a temporary JSON file representing a document with |edit_url| 605 // Creates a temporary JSON file representing a document with |edit_url|
601 // and |resource_id| on IO thread pool. Upon completion it will invoke 606 // and |resource_id| under |document_dir| on IO thread pool. Upon completion
602 // |callback| with the path of the created temporary file on thread 607 // it will invoke |callback| with the path of the created temporary file on
603 // represented by |relay_proxy|. 608 // thread represented by |relay_proxy|.
604 static void CreateDocumentJsonFileOnIOThreadPool( 609 static void CreateDocumentJsonFileOnIOThreadPool(
610 const FilePath& document_dir,
605 const GURL& edit_url, 611 const GURL& edit_url,
606 const std::string& resource_id, 612 const std::string& resource_id,
607 const GetFileCallback& callback, 613 const GetFileCallback& callback,
608 scoped_refptr<base::MessageLoopProxy> relay_proxy); 614 scoped_refptr<base::MessageLoopProxy> relay_proxy);
609 615
610 // Renames a file or directory at |file_path| to |new_name|. 616 // Renames a file or directory at |file_path| to |new_name|.
611 void Rename(const FilePath& file_path, 617 void Rename(const FilePath& file_path,
612 const FilePath::StringType& new_name, 618 const FilePath::StringType& new_name,
613 const FilePathUpdateCallback& callback); 619 const FilePathUpdateCallback& callback);
614 620
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 1190
1185 // WeakPtrFactory bound to the IO thread. Created when needed. 1191 // WeakPtrFactory bound to the IO thread. Created when needed.
1186 scoped_ptr<base::WeakPtrFactory<GDataFileSystem> > io_weak_ptr_factory_; 1192 scoped_ptr<base::WeakPtrFactory<GDataFileSystem> > io_weak_ptr_factory_;
1187 1193
1188 ObserverList<Observer> observers_; 1194 ObserverList<Observer> observers_;
1189 }; 1195 };
1190 1196
1191 } // namespace gdata 1197 } // namespace gdata
1192 1198
1193 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 1199 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698