OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/write_on_cache_file.h" | 5 #include "chrome/browser/chromeos/drive/write_on_cache_file.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/threading/sequenced_worker_pool.h" | 9 #include "base/threading/sequenced_worker_pool.h" |
| 10 #include "chrome/browser/chromeos/drive/file_system_core_util.h" |
10 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 11 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
11 #include "chrome/browser/chromeos/drive/file_system_util.h" | |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 | 13 |
14 using content::BrowserThread; | 14 using content::BrowserThread; |
15 | 15 |
16 namespace drive { | 16 namespace drive { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // Runs |close_callback| and |reply|. | 20 // Runs |close_callback| and |reply|. |
21 void RunCloseCallbackAndReplyTask(const base::Closure& close_callback, | 21 void RunCloseCallbackAndReplyTask(const base::Closure& close_callback, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 DCHECK(!reply.is_null()); | 65 DCHECK(!reply.is_null()); |
66 | 66 |
67 file_system->OpenFile( | 67 file_system->OpenFile( |
68 path, | 68 path, |
69 OPEN_OR_CREATE_FILE, | 69 OPEN_OR_CREATE_FILE, |
70 mime_type, | 70 mime_type, |
71 base::Bind(&WriteOnCacheFileAfterOpenFile, path, callback, reply)); | 71 base::Bind(&WriteOnCacheFileAfterOpenFile, path, callback, reply)); |
72 } | 72 } |
73 | 73 |
74 } // namespace drive | 74 } // namespace drive |
OLD | NEW |