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

Side by Side Diff: components/reporting/core/browser/reporting_uploader.h

Issue 2249213002: [OBSOLETE] Reporting: Initial implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ProfileImplIOData Created 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_REPORTING_CORE_BROWSER_REPORTING_UPLOADER_H_
6 #define COMPONENTS_REPORTING_CORE_BROWSER_REPORTING_UPLOADER_H_
7
8 #include "base/callback.h"
9 #include "components/reporting/core/common/reporting_export.h"
10 #include "net/url_request/url_fetcher.h"
11 #include "net/url_request/url_fetcher_delegate.h"
12 #include "net/url_request/url_request_context_getter.h"
13 #include "url/gurl.h"
14
15 namespace reporting {
16
17 class REPORTING_EXPORT ReportingUploader {
18 public:
19 enum Outcome { SUCCESS, REMOVE_ENDPOINT, FAILURE };
20
21 using Callback = base::Callback<void(Outcome outcome)>;
22
23 virtual void AttemptDelivery(const GURL& url,
24 const std::string& json,
25 const Callback& callback) = 0;
26
27 static std::unique_ptr<ReportingUploader> Create(
28 scoped_refptr<net::URLRequestContextGetter> context);
29 };
30
31 } // namespace reporting
32
33 #endif // COMPONENTS_REPORTING_CORE_BROWSER_REPORTING_UPLOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698