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

Side by Side Diff: chrome/browser/google_apis/gdata_wapi_operations.h

Issue 11577002: Converted ResumeUploadOperation to use JSON in response instead of XML. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_
6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE; 558 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE;
559 virtual std::vector<std::string> GetExtraRequestHeaders() const OVERRIDE; 559 virtual std::vector<std::string> GetExtraRequestHeaders() const OVERRIDE;
560 virtual bool GetContentData(std::string* upload_content_type, 560 virtual bool GetContentData(std::string* upload_content_type,
561 std::string* upload_content) OVERRIDE; 561 std::string* upload_content) OVERRIDE;
562 562
563 // content::UrlFetcherDelegate overrides. 563 // content::UrlFetcherDelegate overrides.
564 virtual void OnURLFetchUploadProgress(const net::URLFetcher* source, 564 virtual void OnURLFetchUploadProgress(const net::URLFetcher* source,
565 int64 current, int64 total) OVERRIDE; 565 int64 current, int64 total) OVERRIDE;
566 566
567 private: 567 private:
568 // Called when ParseJson() is completed.
569 void OnDataParsed(GDataErrorCode code, scoped_ptr<base::Value> value);
570
568 const ResumeUploadCallback callback_; 571 const ResumeUploadCallback callback_;
569 const ResumeUploadParams params_; 572 const ResumeUploadParams params_;
570 bool last_chunk_completed_; 573 bool last_chunk_completed_;
571 574
575 // Note: This should remain the last member so it'll be destroyed and
576 // invalidate its weak pointers before any other members are destroyed.
577 base::WeakPtrFactory<ResumeUploadOperation> weak_ptr_factory_;
572 DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation); 578 DISALLOW_COPY_AND_ASSIGN(ResumeUploadOperation);
573 }; 579 };
574 580
575 } // namespace google_apis 581 } // namespace google_apis
576 582
577 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ 583 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/base_operations_unittest.cc ('k') | chrome/browser/google_apis/gdata_wapi_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698