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 #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 Loading... |
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_ |
OLD | NEW |