| 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_system/operations.h" | 5 #include "chrome/browser/chromeos/drive/file_system/operations.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "chrome/browser/chromeos/drive/file_system/copy_operation.h" | 8 #include "chrome/browser/chromeos/drive/file_system/copy_operation.h" |
| 9 #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h
" | 9 #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h
" |
| 10 #include "chrome/browser/chromeos/drive/file_system/create_file_operation.h" | 10 #include "chrome/browser/chromeos/drive/file_system/create_file_operation.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 DCHECK(!last_access_time.is_null()); | 151 DCHECK(!last_access_time.is_null()); |
| 152 DCHECK(!last_modified_time.is_null()); | 152 DCHECK(!last_modified_time.is_null()); |
| 153 DCHECK(!callback.is_null()); | 153 DCHECK(!callback.is_null()); |
| 154 | 154 |
| 155 touch_operation_->TouchFile( | 155 touch_operation_->TouchFile( |
| 156 file_path, last_access_time, last_modified_time, callback); | 156 file_path, last_access_time, last_modified_time, callback); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void Operations::EnsureFileDownloaded( | 159 void Operations::EnsureFileDownloaded( |
| 160 const base::FilePath& file_path, | 160 const base::FilePath& file_path, |
| 161 DriveClientContext context, | 161 const ClientContext& context, |
| 162 const GetFileContentInitializedCallback& initialized_callback, | 162 const GetFileContentInitializedCallback& initialized_callback, |
| 163 const google_apis::GetContentCallback& get_content_callback, | 163 const google_apis::GetContentCallback& get_content_callback, |
| 164 const GetFileCallback& completion_callback) { | 164 const GetFileCallback& completion_callback) { |
| 165 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 165 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 166 DCHECK(!completion_callback.is_null()); | 166 DCHECK(!completion_callback.is_null()); |
| 167 | 167 |
| 168 download_operation_->EnsureFileDownloaded( | 168 download_operation_->EnsureFileDownloaded( |
| 169 file_path, context, initialized_callback, get_content_callback, | 169 file_path, context, initialized_callback, get_content_callback, |
| 170 completion_callback); | 170 completion_callback); |
| 171 } | 171 } |
| 172 | 172 |
| 173 void Operations::UpdateFileByResourceId( | 173 void Operations::UpdateFileByResourceId( |
| 174 const std::string& resource_id, | 174 const std::string& resource_id, |
| 175 DriveClientContext context, | 175 const ClientContext& context, |
| 176 const FileOperationCallback& callback) { | 176 const FileOperationCallback& callback) { |
| 177 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 177 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 178 DCHECK(!callback.is_null()); | 178 DCHECK(!callback.is_null()); |
| 179 | 179 |
| 180 update_operation_->UpdateFileByResourceId(resource_id, context, callback); | 180 update_operation_->UpdateFileByResourceId(resource_id, context, callback); |
| 181 } | 181 } |
| 182 | 182 |
| 183 void Operations::Search(const std::string& search_query, | 183 void Operations::Search(const std::string& search_query, |
| 184 const GURL& next_feed, | 184 const GURL& next_feed, |
| 185 const SearchOperationCallback& callback) { | 185 const SearchOperationCallback& callback) { |
| 186 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 186 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 187 DCHECK(!callback.is_null()); | 187 DCHECK(!callback.is_null()); |
| 188 | 188 |
| 189 search_operation_->Search(search_query, next_feed, callback); | 189 search_operation_->Search(search_query, next_feed, callback); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace file_system | 192 } // namespace file_system |
| 193 } // namespace drive | 193 } // namespace drive |
| OLD | NEW |