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

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

Issue 10198003: gdata: Get rid of GetGDataCacheTmpDirectory() and friends (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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 | Annotate | Revision Log
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 #pragma once 7 #pragma once
8 8
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 10
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 // Finds a file (not a directory) by |file_path| and returns its key 361 // Finds a file (not a directory) by |file_path| and returns its key
362 // |properties|. Returns true if file was found. 362 // |properties|. Returns true if file was found.
363 virtual bool GetFileInfoByPath(const FilePath& gdata_file_path, 363 virtual bool GetFileInfoByPath(const FilePath& gdata_file_path,
364 GDataFileProperties* properties) = 0; 364 GDataFileProperties* properties) = 0;
365 365
366 // Returns true if the given path is under gdata cache directory, i.e. 366 // Returns true if the given path is under gdata cache directory, i.e.
367 // <user_profile_dir>/GCache/v1 367 // <user_profile_dir>/GCache/v1
368 virtual bool IsUnderGDataCacheDirectory(const FilePath& path) const = 0; 368 virtual bool IsUnderGDataCacheDirectory(const FilePath& path) const = 0;
369 369
370 // Returns the tmp sub-directory under gdata cache directory, i.e. 370 // Returns the sub-directory under gdata cache directory for the given sub
371 // <user_profile_dir>/GCache/v1/tmp 371 // directory type. Example: <user_profile_dir>/GCache/v1/tmp
372 virtual FilePath GetGDataCacheTmpDirectory() const = 0; 372 virtual FilePath GetCacheDirectoryPath(
373 373 GDataRootDirectory::CacheSubDirectoryType sub_dir_type) const = 0;
374 // Returns the tmp downloads sub-directory under gdata cache directory, i.e.
375 // <user_profile_dir>/GCache/v1/tmp/downloads/
376 virtual FilePath GetGDataTempDownloadFolderPath() const = 0;
377
378 // Returns the tmp documents sub-directory under gdata cache directory, i.e.
379 // <user_profile_dir>/GCache/v1/tmp/documents/
380 virtual FilePath GetGDataTempDocumentFolderPath() const = 0;
381
382 // Returns the pinned sub-directory under gdata cache directory, i.e.
383 // <user_profile_dir>/GCache/v1/pinned
384 virtual FilePath GetGDataCachePinnedDirectory() const = 0;
385
386 // Returns the pinned sub-directory under gdata cache directory, i.e.
387 // <user_profile_dir>/GCache/v1/pinned
388 virtual FilePath GetGDataCachePersistentDirectory() const = 0;
389 374
390 // Returns absolute path of the file if it were cached or to be cached. 375 // Returns absolute path of the file if it were cached or to be cached.
391 virtual FilePath GetCacheFilePath( 376 virtual FilePath GetCacheFilePath(
392 const std::string& resource_id, 377 const std::string& resource_id,
393 const std::string& md5, 378 const std::string& md5,
394 GDataRootDirectory::CacheSubDirectoryType sub_dir_type, 379 GDataRootDirectory::CacheSubDirectoryType sub_dir_type,
395 CachedFileOrigin file_orign) const = 0; 380 CachedFileOrigin file_orign) const = 0;
396 381
397 // Fetches the user's Account Metadata to find out current quota information 382 // Fetches the user's Account Metadata to find out current quota information
398 // and returns it to the callback. 383 // and returns it to the callback.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 virtual void AddOperationObserver( 450 virtual void AddOperationObserver(
466 GDataOperationRegistry::Observer* observer) OVERRIDE; 451 GDataOperationRegistry::Observer* observer) OVERRIDE;
467 virtual void RemoveOperationObserver( 452 virtual void RemoveOperationObserver(
468 GDataOperationRegistry::Observer* observer) OVERRIDE; 453 GDataOperationRegistry::Observer* observer) OVERRIDE;
469 virtual void GetCacheState(const std::string& resource_id, 454 virtual void GetCacheState(const std::string& resource_id,
470 const std::string& md5, 455 const std::string& md5,
471 const GetCacheStateCallback& callback) OVERRIDE; 456 const GetCacheStateCallback& callback) OVERRIDE;
472 virtual bool GetFileInfoByPath(const FilePath& gdata_file_path, 457 virtual bool GetFileInfoByPath(const FilePath& gdata_file_path,
473 GDataFileProperties* properties) OVERRIDE; 458 GDataFileProperties* properties) OVERRIDE;
474 virtual bool IsUnderGDataCacheDirectory(const FilePath& path) const OVERRIDE; 459 virtual bool IsUnderGDataCacheDirectory(const FilePath& path) const OVERRIDE;
475 virtual FilePath GetGDataCacheTmpDirectory() const OVERRIDE; 460 virtual FilePath GetCacheDirectoryPath(
476 virtual FilePath GetGDataTempDownloadFolderPath() const OVERRIDE; 461 GDataRootDirectory::CacheSubDirectoryType sub_dir_type) const OVERRIDE;
477 virtual FilePath GetGDataTempDocumentFolderPath() const OVERRIDE;
478 virtual FilePath GetGDataCachePinnedDirectory() const OVERRIDE;
479 virtual FilePath GetGDataCachePersistentDirectory() const OVERRIDE;
480 virtual FilePath GetCacheFilePath( 462 virtual FilePath GetCacheFilePath(
481 const std::string& resource_id, 463 const std::string& resource_id,
482 const std::string& md5, 464 const std::string& md5,
483 GDataRootDirectory::CacheSubDirectoryType sub_dir_type, 465 GDataRootDirectory::CacheSubDirectoryType sub_dir_type,
484 CachedFileOrigin file_orign) const OVERRIDE; 466 CachedFileOrigin file_orign) const OVERRIDE;
485 virtual void GetAvailableSpace( 467 virtual void GetAvailableSpace(
486 const GetAvailableSpaceCallback& callback) OVERRIDE; 468 const GetAvailableSpaceCallback& callback) OVERRIDE;
487 // Calls private Pin or Unpin methods with |callback|. 469 // Calls private Pin or Unpin methods with |callback|.
488 virtual void SetPinState(const FilePath& file_path, bool pin, 470 virtual void SetPinState(const FilePath& file_path, bool pin,
489 const FileOperationCallback& callback) OVERRIDE; 471 const FileOperationCallback& callback) OVERRIDE;
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 }; 1362 };
1381 1363
1382 // Sets the free disk space getter for testing. 1364 // Sets the free disk space getter for testing.
1383 // The existing getter is deleted. 1365 // The existing getter is deleted.
1384 void SetFreeDiskSpaceGetterForTesting( 1366 void SetFreeDiskSpaceGetterForTesting(
1385 FreeDiskSpaceGetterInterface* getter); 1367 FreeDiskSpaceGetterInterface* getter);
1386 1368
1387 } // namespace gdata 1369 } // namespace gdata
1388 1370
1389 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 1371 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_private_api.cc ('k') | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698