Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Side by Side Diff: chrome/browser/google_apis/drive_api_service.cc

Issue 12207075: Split InitiateUpload method into two. (Closed) Base URL: http://git.chromium.org/chromium/src.git@b148632_extract_initiate_upload_operation_base
Patch Set: Rebase Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 runner_->StartOperationWithRetry( 439 runner_->StartOperationWithRetry(
440 new drive::DeleteResourceOperation( 440 new drive::DeleteResourceOperation(
441 operation_registry(), 441 operation_registry(),
442 url_request_context_getter_, 442 url_request_context_getter_,
443 url_generator_, 443 url_generator_,
444 parent_resource_id, 444 parent_resource_id,
445 resource_id, 445 resource_id,
446 callback)); 446 callback));
447 } 447 }
448 448
449 void DriveAPIService::InitiateUpload( 449 void DriveAPIService::InitiateUploadNewFile(
450 const InitiateUploadParams& params, 450 const FilePath& drive_file_path,
451 const std::string& content_type,
452 int64 content_length,
453 const GURL& parent_upload_url,
454 const std::string& title,
451 const InitiateUploadCallback& callback) { 455 const InitiateUploadCallback& callback) {
452 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 456 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
453 DCHECK(!callback.is_null()); 457 DCHECK(!callback.is_null());
454 458
455 // TODO(kochi): Implement this. 459 // TODO(hidehiko): Implement this.
456 NOTREACHED(); 460 NOTREACHED();
457 } 461 }
458 462
463 void DriveAPIService::InitiateUploadExistingFile(
464 const FilePath& drive_file_path,
465 const std::string& content_type,
466 int64 content_length,
467 const GURL& upload_url,
468 const std::string& etag,
469 const InitiateUploadCallback& callback) {
470 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
471 DCHECK(!callback.is_null());
472
473 // TODO(hidehiko): Implement this.
474 NOTREACHED();
475 }
476
459 void DriveAPIService::ResumeUpload( 477 void DriveAPIService::ResumeUpload(
460 const ResumeUploadParams& params, 478 const ResumeUploadParams& params,
461 const UploadRangeCallback& callback) { 479 const UploadRangeCallback& callback) {
462 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 480 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
463 DCHECK(!callback.is_null()); 481 DCHECK(!callback.is_null());
464 482
465 // TODO(kochi): Implement this. 483 // TODO(kochi): Implement this.
466 NOTREACHED(); 484 NOTREACHED();
467 } 485 }
468 486
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 } 546 }
529 547
530 void DriveAPIService::OnProgressUpdate( 548 void DriveAPIService::OnProgressUpdate(
531 const OperationProgressStatusList& list) { 549 const OperationProgressStatusList& list) {
532 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 550 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
533 FOR_EACH_OBSERVER( 551 FOR_EACH_OBSERVER(
534 DriveServiceObserver, observers_, OnProgressUpdate(list)); 552 DriveServiceObserver, observers_, OnProgressUpdate(list));
535 } 553 }
536 554
537 } // namespace google_apis 555 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_service.h ('k') | chrome/browser/google_apis/drive_service_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698