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

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

Issue 10735049: gdata: Take GDataCache::CacheEntry as parameters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: polish Created 8 years, 5 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_cache.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_CACHE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_CACHE_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_CACHE_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_CACHE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 const std::string& md5, 475 const std::string& md5,
476 const CacheOperationCallback& callback); 476 const CacheOperationCallback& callback);
477 477
478 // Helper function to implement GetCacheEntryOnUIThread(). 478 // Helper function to implement GetCacheEntryOnUIThread().
479 void GetCacheEntryHelper(const std::string& resource_id, 479 void GetCacheEntryHelper(const std::string& resource_id,
480 const std::string& md5, 480 const std::string& md5,
481 bool* success, 481 bool* success,
482 GDataCache::CacheEntry* cache_entry); 482 GDataCache::CacheEntry* cache_entry);
483 483
484 // Wrapper around GDataCacheMetadata::UpdateCache(). This function takes 484 // Wrapper around GDataCacheMetadata::UpdateCache(). This function takes
485 // |sub_dir_type| and modifies |cache_state| per the sub directory type. 485 // |sub_dir_type| and updates the cache per |cache_entry| and |sub_dir_type|.
486 void UpdateCacheWithSubDirectoryType(const std::string& resource_id, 486 void UpdateCacheWithSubDirectoryType(
487 const std::string& md5, 487 const std::string& resource_id,
488 CacheSubDirectoryType sub_dir_type, 488 CacheSubDirectoryType sub_dir_type,
489 int cache_state); 489 const CacheEntry& cache_entry);
490 490
491 // The root directory of the cache (i.e. <user_profile_dir>/GCache/v1). 491 // The root directory of the cache (i.e. <user_profile_dir>/GCache/v1).
492 const FilePath cache_root_path_; 492 const FilePath cache_root_path_;
493 // Paths for all subdirectories of GCache, one for each 493 // Paths for all subdirectories of GCache, one for each
494 // GDataCache::CacheSubDirectoryType enum. 494 // GDataCache::CacheSubDirectoryType enum.
495 const std::vector<FilePath> cache_paths_; 495 const std::vector<FilePath> cache_paths_;
496 base::SequencedWorkerPool* pool_; 496 base::SequencedWorkerPool* pool_;
497 const base::SequencedWorkerPool::SequenceToken sequence_token_; 497 const base::SequencedWorkerPool::SequenceToken sequence_token_;
498 498
499 // The cache state data. This member must be access only on the blocking pool. 499 // The cache state data. This member must be access only on the blocking pool.
(...skipping 26 matching lines...) Expand all
526 }; 526 };
527 527
528 // Sets the free disk space getter for testing. 528 // Sets the free disk space getter for testing.
529 // The existing getter is deleted. 529 // The existing getter is deleted.
530 void SetFreeDiskSpaceGetterForTesting( 530 void SetFreeDiskSpaceGetterForTesting(
531 FreeDiskSpaceGetterInterface* getter); 531 FreeDiskSpaceGetterInterface* getter);
532 532
533 } // namespace gdata 533 } // namespace gdata
534 534
535 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_CACHE_H_ 535 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698