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

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

Issue 10535145: chromeos: Stop calling gdata::GDataCache::GetCacheEntry on UI thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 8 years, 6 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_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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 enum CachedFileOrigin { 50 enum CachedFileOrigin {
51 CACHED_FILE_FROM_SERVER = 0, 51 CACHED_FILE_FROM_SERVER = 0,
52 CACHED_FILE_LOCALLY_MODIFIED, 52 CACHED_FILE_LOCALLY_MODIFIED,
53 CACHED_FILE_MOUNTED, 53 CACHED_FILE_MOUNTED,
54 }; 54 };
55 55
56 static const char kMountedArchiveFileExtension[]; 56 static const char kMountedArchiveFileExtension[];
57 57
58 // Structure to store information of an existing cache file. 58 // Structure to store information of an existing cache file.
59 struct CacheEntry { 59 struct CacheEntry {
60 CacheEntry() : sub_dir_type(CACHE_TYPE_META),
61 cache_state(0) {}
62
60 CacheEntry(const std::string& md5, 63 CacheEntry(const std::string& md5,
61 CacheSubDirectoryType sub_dir_type, 64 CacheSubDirectoryType sub_dir_type,
62 int cache_state) 65 int cache_state)
satorux1 2012/06/14 01:24:42 please fix the indentation while you are at it.
hashimoto 2012/06/14 03:12:02 Done.
63 : md5(md5), 66 : md5(md5),
64 sub_dir_type(sub_dir_type), 67 sub_dir_type(sub_dir_type),
65 cache_state(cache_state) { 68 cache_state(cache_state) {
66 } 69 }
67 70
68 bool IsPresent() const { return IsCachePresent(cache_state); } 71 bool IsPresent() const { return IsCachePresent(cache_state); }
69 bool IsPinned() const { return IsCachePinned(cache_state); } 72 bool IsPinned() const { return IsCachePinned(cache_state); }
70 bool IsDirty() const { return IsCacheDirty(cache_state); } 73 bool IsDirty() const { return IsCacheDirty(cache_state); }
71 bool IsMounted() const { return IsCacheMounted(cache_state); } 74 bool IsMounted() const { return IsCacheMounted(cache_state); }
72 75
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 std::vector<FilePath> cache_paths_; 198 std::vector<FilePath> cache_paths_;
196 base::SequencedWorkerPool* pool_; 199 base::SequencedWorkerPool* pool_;
197 const base::SequencedWorkerPool::SequenceToken sequence_token_; 200 const base::SequencedWorkerPool::SequenceToken sequence_token_;
198 201
199 DISALLOW_COPY_AND_ASSIGN(GDataCache); 202 DISALLOW_COPY_AND_ASSIGN(GDataCache);
200 }; 203 };
201 204
202 } // namespace gdata 205 } // namespace gdata
203 206
204 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_CACHE_H_ 207 #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') | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698