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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 2769083005: Reporting: Set up in ProfileImplIOData. (Closed)
Patch Set: rebase 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 | « net/reporting/reporting_service.cc ('k') | no next file » | 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 #include <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 6621 matching lines...) Expand 10 before | Expand all | Expand 10 after
6632 6632
6633 namespace { 6633 namespace {
6634 6634
6635 class TestReportingService : public ReportingService { 6635 class TestReportingService : public ReportingService {
6636 public: 6636 public:
6637 struct Header { 6637 struct Header {
6638 GURL url; 6638 GURL url;
6639 std::string header_value; 6639 std::string header_value;
6640 }; 6640 };
6641 6641
6642 const std::vector<Header>& headers() { return headers_; }
6643
6644 // ReportingService implementation:
6645
6642 ~TestReportingService() override {} 6646 ~TestReportingService() override {}
6643 6647
6644 const std::vector<Header>& headers() { return headers_; }
6645
6646 void QueueReport(const GURL& url, 6648 void QueueReport(const GURL& url,
6647 const std::string& group, 6649 const std::string& group,
6648 const std::string& type, 6650 const std::string& type,
6649 std::unique_ptr<const base::Value> body) override { 6651 std::unique_ptr<const base::Value> body) override {
6650 NOTIMPLEMENTED(); 6652 NOTIMPLEMENTED();
6651 } 6653 }
6652 6654
6653 void ProcessHeader(const GURL& url, 6655 void ProcessHeader(const GURL& url,
6654 const std::string& header_value) override { 6656 const std::string& header_value) override {
6655 headers_.push_back({url, header_value}); 6657 headers_.push_back({url, header_value});
(...skipping 4411 matching lines...) Expand 10 before | Expand all | Expand 10 after
11067 AddTestInterceptor()->set_main_intercept_job(std::move(job)); 11069 AddTestInterceptor()->set_main_intercept_job(std::move(job));
11068 11070
11069 req->Start(); 11071 req->Start();
11070 req->Cancel(); 11072 req->Cancel();
11071 base::RunLoop().RunUntilIdle(); 11073 base::RunLoop().RunUntilIdle();
11072 EXPECT_EQ(ERR_ABORTED, d.request_status()); 11074 EXPECT_EQ(ERR_ABORTED, d.request_status());
11073 EXPECT_EQ(0, d.received_redirect_count()); 11075 EXPECT_EQ(0, d.received_redirect_count());
11074 } 11076 }
11075 11077
11076 } // namespace net 11078 } // namespace net
OLDNEW
« no previous file with comments | « net/reporting/reporting_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698