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

Side by Side Diff: components/component_updater/request_sender.h

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_COMPONENT_UPDATER_REQUEST_SENDER_H_ 5 #ifndef COMPONENTS_COMPONENT_UPDATER_REQUEST_SENDER_H_
6 #define COMPONENTS_COMPONENT_UPDATER_REQUEST_SENDER_H_ 6 #define COMPONENTS_COMPONENT_UPDATER_REQUEST_SENDER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 16 matching lines...) Expand all
27 // of responsibility design pattern, where the urls are tried in the order they 27 // of responsibility design pattern, where the urls are tried in the order they
28 // are specified, until the request to one of them succeeds or all have failed. 28 // are specified, until the request to one of them succeeds or all have failed.
29 class RequestSender : public net::URLFetcherDelegate { 29 class RequestSender : public net::URLFetcherDelegate {
30 public: 30 public:
31 // The |source| refers to the fetcher object used to make the request. This 31 // The |source| refers to the fetcher object used to make the request. This
32 // parameter can be NULL in some error cases. 32 // parameter can be NULL in some error cases.
33 typedef base::Callback<void(const net::URLFetcher* source)> 33 typedef base::Callback<void(const net::URLFetcher* source)>
34 RequestSenderCallback; 34 RequestSenderCallback;
35 35
36 explicit RequestSender(const Configurator& config); 36 explicit RequestSender(const Configurator& config);
37 virtual ~RequestSender(); 37 ~RequestSender() override;
38 38
39 void Send(const std::string& request_string, 39 void Send(const std::string& request_string,
40 const std::vector<GURL>& urls, 40 const std::vector<GURL>& urls,
41 const RequestSenderCallback& request_sender_callback); 41 const RequestSenderCallback& request_sender_callback);
42 42
43 private: 43 private:
44 void SendInternal(); 44 void SendInternal();
45 45
46 // Overrides for URLFetcherDelegate. 46 // Overrides for URLFetcherDelegate.
47 virtual void OnURLFetchComplete(const net::URLFetcher* source) override; 47 void OnURLFetchComplete(const net::URLFetcher* source) override;
48 48
49 const Configurator& config_; 49 const Configurator& config_;
50 std::vector<GURL> urls_; 50 std::vector<GURL> urls_;
51 std::vector<GURL>::const_iterator cur_url_; 51 std::vector<GURL>::const_iterator cur_url_;
52 scoped_ptr<net::URLFetcher> url_fetcher_; 52 scoped_ptr<net::URLFetcher> url_fetcher_;
53 std::string request_string_; 53 std::string request_string_;
54 RequestSenderCallback request_sender_callback_; 54 RequestSenderCallback request_sender_callback_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(RequestSender); 56 DISALLOW_COPY_AND_ASSIGN(RequestSender);
57 }; 57 };
58 58
59 } // namespace component_updater 59 } // namespace component_updater
60 60
61 #endif // COMPONENTS_COMPONENT_UPDATER_REQUEST_SENDER_H_ 61 #endif // COMPONENTS_COMPONENT_UPDATER_REQUEST_SENDER_H_
OLDNEW
« no previous file with comments | « components/component_updater/default_component_installer.h ('k') | components/component_updater/test/test_configurator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698