OLD | NEW |
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 #include "chrome/browser/chromeos/drive/file_cache.h" | 5 #include "chrome/browser/chromeos/drive/file_cache.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "base/sys_info.h" | 13 #include "base/sys_info.h" |
14 #include "base/task_runner_util.h" | 14 #include "base/task_runner_util.h" |
15 #include "chrome/browser/chromeos/drive/drive.pb.h" | 15 #include "chrome/browser/chromeos/drive/drive.pb.h" |
16 #include "chrome/browser/chromeos/drive/file_cache_metadata.h" | 16 #include "chrome/browser/chromeos/drive/file_cache_metadata.h" |
17 #include "chrome/browser/chromeos/drive/file_cache_observer.h" | 17 #include "chrome/browser/chromeos/drive/file_cache_observer.h" |
18 #include "chrome/browser/chromeos/drive/file_system_util.h" | 18 #include "chrome/browser/chromeos/drive/file_system_util.h" |
19 #include "chrome/browser/google_apis/task_util.h" | 19 #include "chrome/browser/google_apis/task_util.h" |
20 #include "chromeos/chromeos_constants.h" | |
21 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
22 | 21 |
23 using content::BrowserThread; | 22 using content::BrowserThread; |
24 | 23 |
25 namespace drive { | 24 namespace drive { |
26 namespace { | 25 namespace { |
27 | 26 |
28 const base::FilePath::CharType kFileCacheMetaDir[] = FILE_PATH_LITERAL("meta"); | 27 const base::FilePath::CharType kFileCacheMetaDir[] = FILE_PATH_LITERAL("meta"); |
29 const base::FilePath::CharType kFileCacheOutgoingDir[] = | 28 const base::FilePath::CharType kFileCacheOutgoingDir[] = |
30 FILE_PATH_LITERAL("outgoing"); | 29 FILE_PATH_LITERAL("outgoing"); |
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 return success; | 1222 return success; |
1224 } | 1223 } |
1225 | 1224 |
1226 // static | 1225 // static |
1227 FileCache::CacheSubDirectoryType FileCache::GetSubDirectoryType( | 1226 FileCache::CacheSubDirectoryType FileCache::GetSubDirectoryType( |
1228 const FileCacheEntry& cache_entry) { | 1227 const FileCacheEntry& cache_entry) { |
1229 return cache_entry.is_persistent() ? CACHE_TYPE_PERSISTENT : CACHE_TYPE_TMP; | 1228 return cache_entry.is_persistent() ? CACHE_TYPE_PERSISTENT : CACHE_TYPE_TMP; |
1230 } | 1229 } |
1231 | 1230 |
1232 } // namespace drive | 1231 } // namespace drive |
OLD | NEW |