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

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

Issue 12218011: WIP: Implement 5xx Error handling. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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/gdata_wapi_service.h" 5 #include "chrome/browser/google_apis/gdata_wapi_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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 431 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
432 DCHECK(!callback.is_null()); 432 DCHECK(!callback.is_null());
433 433
434 runner_->StartOperationWithRetry( 434 runner_->StartOperationWithRetry(
435 new ResumeUploadOperation(operation_registry(), 435 new ResumeUploadOperation(operation_registry(),
436 url_request_context_getter_, 436 url_request_context_getter_,
437 callback, 437 callback,
438 params)); 438 params));
439 } 439 }
440 440
441 void GDataWapiService::GetUploadState(
442 const UploadMode upload_mode,
443 const FilePath& drive_file_path,
444 const GURL& upload_url,
445 int64 content_length,
446 const ResumeUploadCallback& callback) {
447 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
448 DCHECK(!callback.is_null());
449
450 runner_->StartOperationWithRetry(
451 new GetUploadStateOperation(operation_registry(),
452 url_request_context_getter_,
453 callback,
454 upload_mode,
455 drive_file_path,
456 upload_url,
457 content_length));
458 }
459
441 void GDataWapiService::AuthorizeApp(const GURL& edit_url, 460 void GDataWapiService::AuthorizeApp(const GURL& edit_url,
442 const std::string& app_id, 461 const std::string& app_id,
443 const AuthorizeAppCallback& callback) { 462 const AuthorizeAppCallback& callback) {
444 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 463 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
445 DCHECK(!callback.is_null()); 464 DCHECK(!callback.is_null());
446 465
447 runner_->StartOperationWithRetry( 466 runner_->StartOperationWithRetry(
448 new AuthorizeAppOperation( 467 new AuthorizeAppOperation(
449 operation_registry(), 468 operation_registry(),
450 url_request_context_getter_, 469 url_request_context_getter_,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 DriveServiceObserver, observers_, OnProgressUpdate(list)); 514 DriveServiceObserver, observers_, OnProgressUpdate(list));
496 } 515 }
497 516
498 void GDataWapiService::OnAuthenticationFailed(GDataErrorCode error) { 517 void GDataWapiService::OnAuthenticationFailed(GDataErrorCode error) {
499 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 518 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
500 FOR_EACH_OBSERVER( 519 FOR_EACH_OBSERVER(
501 DriveServiceObserver, observers_, OnAuthenticationFailed(error)); 520 DriveServiceObserver, observers_, OnAuthenticationFailed(error));
502 } 521 }
503 522
504 } // namespace google_apis 523 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/gdata_wapi_service.h ('k') | chrome/browser/google_apis/mock_drive_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698