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

Side by Side Diff: cloud_print/gcp20/prototype/cloud_print_request.h

Issue 1100633004: Update {virtual,override} to follow C++11 style in cloud_print. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile. Created 5 years, 8 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 | cloud_print/gcp20/prototype/cloud_print_requester.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CLOUD_PRINT_GCP20_PROTOTYPE_CLOUD_PRINT_REQUEST_H_ 5 #ifndef CLOUD_PRINT_GCP20_PROTOTYPE_CLOUD_PRINT_REQUEST_H_
6 #define CLOUD_PRINT_GCP20_PROTOTYPE_CLOUD_PRINT_REQUEST_H_ 6 #define CLOUD_PRINT_GCP20_PROTOTYPE_CLOUD_PRINT_REQUEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 20 matching lines...) Expand all
31 // Use for erasing instance of CloudPrintRequest class. 31 // Use for erasing instance of CloudPrintRequest class.
32 virtual void OnFetchError(const std::string& server_api, 32 virtual void OnFetchError(const std::string& server_api,
33 int server_code, 33 int server_code,
34 int server_http_code) = 0; 34 int server_http_code) = 0;
35 35
36 // Invoked when timeout is reached. 36 // Invoked when timeout is reached.
37 // Use for erasing instance of CloudPrintRequest class. 37 // Use for erasing instance of CloudPrintRequest class.
38 virtual void OnFetchTimeoutReached() = 0; 38 virtual void OnFetchTimeoutReached() = 0;
39 }; 39 };
40 40
41 virtual ~CloudPrintRequest(); 41 ~CloudPrintRequest() override;
42 42
43 // Creates GET request. 43 // Creates GET request.
44 static scoped_ptr<CloudPrintRequest> CreateGet(const GURL& url, 44 static scoped_ptr<CloudPrintRequest> CreateGet(const GURL& url,
45 Delegate* delegate); 45 Delegate* delegate);
46 46
47 // Creates POST request. 47 // Creates POST request.
48 static scoped_ptr<CloudPrintRequest> CreatePost(const GURL& url, 48 static scoped_ptr<CloudPrintRequest> CreatePost(const GURL& url,
49 const std::string& content, 49 const std::string& content,
50 const std::string& mimetype, 50 const std::string& mimetype,
51 Delegate* delegate); 51 Delegate* delegate);
52 52
53 // Starts request. Once fetch was completed, parser will be called. 53 // Starts request. Once fetch was completed, parser will be called.
54 void Run(const std::string& access_token, 54 void Run(const std::string& access_token,
55 scoped_refptr<net::URLRequestContextGetter> context_getter); 55 scoped_refptr<net::URLRequestContextGetter> context_getter);
56 56
57 // Add header to request. 57 // Add header to request.
58 void AddHeader(const std::string& header); 58 void AddHeader(const std::string& header);
59 59
60 private: 60 private:
61 CloudPrintRequest(const GURL& url, 61 CloudPrintRequest(const GURL& url,
62 net::URLFetcher::RequestType method, 62 net::URLFetcher::RequestType method,
63 Delegate* delegate); 63 Delegate* delegate);
64 64
65 // net::URLFetcherDelegate methods: 65 // net::URLFetcherDelegate methods:
66 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; 66 void OnURLFetchComplete(const net::URLFetcher* source) override;
67 67
68 // Method for handling timeout. 68 // Method for handling timeout.
69 void OnRequestTimeout(); 69 void OnRequestTimeout();
70 70
71 scoped_ptr<net::URLFetcher> fetcher_; 71 scoped_ptr<net::URLFetcher> fetcher_;
72 72
73 Delegate* delegate_; 73 Delegate* delegate_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(CloudPrintRequest); 75 DISALLOW_COPY_AND_ASSIGN(CloudPrintRequest);
76 }; 76 };
77 77
78 #endif // CLOUD_PRINT_GCP20_PROTOTYPE_CLOUD_PRINT_REQUEST_H_ 78 #endif // CLOUD_PRINT_GCP20_PROTOTYPE_CLOUD_PRINT_REQUEST_H_
79 79
OLDNEW
« no previous file with comments | « no previous file | cloud_print/gcp20/prototype/cloud_print_requester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698