| 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/google_apis/drive_api_service.h" | 5 #include "chrome/browser/google_apis/drive_api_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 if (search_query.empty()) | 277 if (search_query.empty()) |
| 278 GetChangelist(url, start_changestamp, callback); | 278 GetChangelist(url, start_changestamp, callback); |
| 279 else | 279 else |
| 280 GetFilelist(url, search_query, callback); | 280 GetFilelist(url, search_query, callback); |
| 281 | 281 |
| 282 return; | 282 return; |
| 283 // TODO(kochi): Implement !directory_resource_id.empty() case. | 283 // TODO(kochi): Implement !directory_resource_id.empty() case. |
| 284 NOTREACHED(); | 284 NOTREACHED(); |
| 285 } | 285 } |
| 286 | 286 |
| 287 void DriveAPIService::GetAllResourceList( |
| 288 const GetResourceListCallback& callback) { |
| 289 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 290 DCHECK(!callback.is_null()); |
| 291 |
| 292 // TODO(hidehiko): Implement this. |
| 293 NOTIMPLEMENTED(); |
| 294 } |
| 295 |
| 296 void DriveAPIService::GetResourceListInDirectory( |
| 297 const std::string& directory_resource_id, |
| 298 const GetResourceListCallback& callback) { |
| 299 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 300 DCHECK(!directory_resource_id.empty()); |
| 301 DCHECK(!callback.is_null()); |
| 302 |
| 303 // TODO(hidehiko): Implement this. |
| 304 NOTIMPLEMENTED(); |
| 305 } |
| 306 |
| 307 void DriveAPIService::Search(const std::string& search_query, |
| 308 const GetResourceListCallback& callback) { |
| 309 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 310 DCHECK(!search_query.empty()); |
| 311 DCHECK(!callback.is_null()); |
| 312 |
| 313 // TODO(hidehiko): Implement this. |
| 314 NOTIMPLEMENTED(); |
| 315 } |
| 316 |
| 317 void DriveAPIService::SearchInDirectory( |
| 318 const std::string& search_query, |
| 319 const std::string& directory_resource_id, |
| 320 const GetResourceListCallback& callback) { |
| 321 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 322 DCHECK(!search_query.empty()); |
| 323 DCHECK(!directory_resource_id.empty()); |
| 324 DCHECK(!callback.is_null()); |
| 325 |
| 326 // TODO(hidehiko): Implement this. |
| 327 NOTIMPLEMENTED(); |
| 328 } |
| 329 |
| 330 void DriveAPIService::GetChangeList(int64 start_changestamp, |
| 331 const GetResourceListCallback& callback) { |
| 332 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 333 DCHECK(!callback.is_null()); |
| 334 |
| 335 // TODO(hidehiko): Implement this. |
| 336 NOTIMPLEMENTED(); |
| 337 } |
| 338 |
| 339 void DriveAPIService::ContinueGetResourceList( |
| 340 const GURL& override_url, |
| 341 const GetResourceListCallback& callback) { |
| 342 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 343 DCHECK(!callback.is_null()); |
| 344 |
| 345 // TODO(hidehiko): Implement this. |
| 346 NOTIMPLEMENTED(); |
| 347 } |
| 348 |
| 287 void DriveAPIService::GetFilelist( | 349 void DriveAPIService::GetFilelist( |
| 288 const GURL& url, | 350 const GURL& url, |
| 289 const std::string& search_query, | 351 const std::string& search_query, |
| 290 const GetResourceListCallback& callback) { | 352 const GetResourceListCallback& callback) { |
| 291 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 353 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 292 DCHECK(!callback.is_null()); | 354 DCHECK(!callback.is_null()); |
| 293 | 355 |
| 294 runner_->StartOperationWithRetry( | 356 runner_->StartOperationWithRetry( |
| 295 new GetFilelistOperation( | 357 new GetFilelistOperation( |
| 296 operation_registry(), | 358 operation_registry(), |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 } | 698 } |
| 637 | 699 |
| 638 void DriveAPIService::OnProgressUpdate( | 700 void DriveAPIService::OnProgressUpdate( |
| 639 const OperationProgressStatusList& list) { | 701 const OperationProgressStatusList& list) { |
| 640 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 702 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 641 FOR_EACH_OBSERVER( | 703 FOR_EACH_OBSERVER( |
| 642 DriveServiceObserver, observers_, OnProgressUpdate(list)); | 704 DriveServiceObserver, observers_, OnProgressUpdate(list)); |
| 643 } | 705 } |
| 644 | 706 |
| 645 } // namespace google_apis | 707 } // namespace google_apis |
| OLD | NEW |