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

Side by Side Diff: components/feedback/feedback_uploader_delegate.h

Issue 2860963002: Spell success correctly. (Closed)
Patch Set: rebase, nits Created 3 years, 7 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 | « chromeos/attestation/attestation_flow.cc ('k') | courgette/courgette_flow.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 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_FEEDBACK_FEEDBACK_UPLOADER_DELEGATE_H_ 5 #ifndef COMPONENTS_FEEDBACK_FEEDBACK_UPLOADER_DELEGATE_H_
6 #define COMPONENTS_FEEDBACK_FEEDBACK_UPLOADER_DELEGATE_H_ 6 #define COMPONENTS_FEEDBACK_FEEDBACK_UPLOADER_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "components/feedback/feedback_uploader.h" 12 #include "components/feedback/feedback_uploader.h"
13 #include "net/url_request/url_fetcher_delegate.h" 13 #include "net/url_request/url_fetcher_delegate.h"
14 14
15 namespace feedback { 15 namespace feedback {
16 16
17 // FeedbackUploaderDelegate is a simple http uploader for a feedback report. On 17 // FeedbackUploaderDelegate is a simple HTTP uploader for a feedback report.
18 // succes or failure, it deletes itself, but on failure it also notifies the 18 // When finished, it runs the appropriate callback passed in via the
19 // error callback specified when constructing the class instance. 19 // constructor, and then deletes itself.
20 class FeedbackUploaderDelegate : public net::URLFetcherDelegate { 20 class FeedbackUploaderDelegate : public net::URLFetcherDelegate {
21 public: 21 public:
22 FeedbackUploaderDelegate(const std::string& post_body, 22 FeedbackUploaderDelegate(const std::string& post_body,
23 const base::Closure& success_callback, 23 const base::Closure& success_callback,
24 const ReportDataCallback& error_callback); 24 const ReportDataCallback& error_callback);
25 ~FeedbackUploaderDelegate() override; 25 ~FeedbackUploaderDelegate() override;
26 26
27 private: 27 private:
28 // Overridden from net::URLFetcherDelegate. 28 // Overridden from net::URLFetcherDelegate.
29 void OnURLFetchComplete(const net::URLFetcher* source) override; 29 void OnURLFetchComplete(const net::URLFetcher* source) override;
30 30
31 std::string post_body_; 31 std::string post_body_;
32 base::Closure success_callback_; 32 base::Closure success_callback_;
33 ReportDataCallback error_callback_; 33 ReportDataCallback error_callback_;
34 34
35 DISALLOW_COPY_AND_ASSIGN(FeedbackUploaderDelegate); 35 DISALLOW_COPY_AND_ASSIGN(FeedbackUploaderDelegate);
36 }; 36 };
37 37
38 } // namespace feedback 38 } // namespace feedback
39 39
40 #endif // COMPONENTS_FEEDBACK_FEEDBACK_UPLOADER_DELEGATE_H_ 40 #endif // COMPONENTS_FEEDBACK_FEEDBACK_UPLOADER_DELEGATE_H_
OLDNEW
« no previous file with comments | « chromeos/attestation/attestation_flow.cc ('k') | courgette/courgette_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698