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" |
20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
21 | 22 |
22 using content::BrowserThread; | 23 using content::BrowserThread; |
23 | 24 |
24 namespace drive { | 25 namespace drive { |
25 namespace { | 26 namespace { |
26 | 27 |
27 const base::FilePath::CharType kFileCacheMetaDir[] = FILE_PATH_LITERAL("meta"); | 28 const base::FilePath::CharType kFileCacheMetaDir[] = FILE_PATH_LITERAL("meta"); |
28 const base::FilePath::CharType kFileCacheOutgoingDir[] = | 29 const base::FilePath::CharType kFileCacheOutgoingDir[] = |
29 FILE_PATH_LITERAL("outgoing"); | 30 FILE_PATH_LITERAL("outgoing"); |
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 return success; | 1223 return success; |
1223 } | 1224 } |
1224 | 1225 |
1225 // static | 1226 // static |
1226 FileCache::CacheSubDirectoryType FileCache::GetSubDirectoryType( | 1227 FileCache::CacheSubDirectoryType FileCache::GetSubDirectoryType( |
1227 const FileCacheEntry& cache_entry) { | 1228 const FileCacheEntry& cache_entry) { |
1228 return cache_entry.is_persistent() ? CACHE_TYPE_PERSISTENT : CACHE_TYPE_TMP; | 1229 return cache_entry.is_persistent() ? CACHE_TYPE_PERSISTENT : CACHE_TYPE_TMP; |
1229 } | 1230 } |
1230 | 1231 |
1231 } // namespace drive | 1232 } // namespace drive |
OLD | NEW |