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

Side by Side Diff: chrome/service/cloud_print/cloud_print_url_fetcher.h

Issue 12230020: Adding virtual destructor to CloudPrintURLFetcherFactory (Closed) Base URL: https://chromium.googlesource.com/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
« no previous file with comments | « no previous file | chrome/service/cloud_print/cloud_print_url_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ 5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_
6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ 6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 12 matching lines...) Expand all
23 class URLRequestStatus; 23 class URLRequestStatus;
24 } // namespace net 24 } // namespace net
25 25
26 namespace cloud_print { 26 namespace cloud_print {
27 27
28 // Factory for creating CloudPrintURLFetchers. 28 // Factory for creating CloudPrintURLFetchers.
29 class CloudPrintURLFetcher; 29 class CloudPrintURLFetcher;
30 class CloudPrintURLFetcherFactory { 30 class CloudPrintURLFetcherFactory {
31 public: 31 public:
32 virtual CloudPrintURLFetcher* CreateCloudPrintURLFetcher() = 0; 32 virtual CloudPrintURLFetcher* CreateCloudPrintURLFetcher() = 0;
33 virtual ~CloudPrintURLFetcherFactory();
33 }; 34 };
34 35
35 // A wrapper around URLFetcher for CloudPrint. URLFetcher applies retry logic 36 // A wrapper around URLFetcher for CloudPrint. URLFetcher applies retry logic
36 // only on HTTP response codes >= 500. In the cloud print case, we want to 37 // only on HTTP response codes >= 500. In the cloud print case, we want to
37 // retry on all network errors. In addition, we want to treat non-JSON responses 38 // retry on all network errors. In addition, we want to treat non-JSON responses
38 // (for all CloudPrint APIs that expect JSON responses) as errors and they 39 // (for all CloudPrint APIs that expect JSON responses) as errors and they
39 // must also be retried. 40 // must also be retried.
40 class CloudPrintURLFetcher 41 class CloudPrintURLFetcher
41 : public base::RefCountedThreadSafe<CloudPrintURLFetcher>, 42 : public base::RefCountedThreadSafe<CloudPrintURLFetcher>,
42 public net::URLFetcherDelegate { 43 public net::URLFetcherDelegate {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 std::string additional_headers_; 146 std::string additional_headers_;
146 std::string post_data_mime_type_; 147 std::string post_data_mime_type_;
147 std::string post_data_; 148 std::string post_data_;
148 }; 149 };
149 150
150 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate; 151 typedef CloudPrintURLFetcher::Delegate CloudPrintURLFetcherDelegate;
151 152
152 } // namespace cloud_print 153 } // namespace cloud_print
153 154
154 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_ 155 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_URL_FETCHER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/service/cloud_print/cloud_print_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698