OLD | NEW |
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 #include "components/precache/core/precache_fetcher.h" | 5 #include "components/precache/core/precache_fetcher.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <cstring> | 9 #include <cstring> |
10 #include <memory> | 10 #include <memory> |
11 #include <set> | 11 #include <set> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
19 #include "base/memory/ptr_util.h" | 19 #include "base/memory/ptr_util.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
22 #include "base/run_loop.h" | 22 #include "base/run_loop.h" |
23 #include "base/test/histogram_tester.h" | 23 #include "base/test/histogram_tester.h" |
24 #include "base/thread_task_runner_handle.h" | 24 #include "base/threading/thread_task_runner_handle.h" |
25 #include "components/precache/core/precache_switches.h" | 25 #include "components/precache/core/precache_switches.h" |
26 #include "components/precache/core/proto/precache.pb.h" | 26 #include "components/precache/core/proto/precache.pb.h" |
27 #include "net/base/load_flags.h" | 27 #include "net/base/load_flags.h" |
28 #include "net/http/http_response_headers.h" | 28 #include "net/http/http_response_headers.h" |
29 #include "net/http/http_status_code.h" | 29 #include "net/http/http_status_code.h" |
30 #include "net/url_request/test_url_fetcher_factory.h" | 30 #include "net/url_request/test_url_fetcher_factory.h" |
31 #include "net/url_request/url_request_status.h" | 31 #include "net/url_request/url_request_status.h" |
32 #include "net/url_request/url_request_test_util.h" | 32 #include "net/url_request/url_request_test_util.h" |
33 #include "testing/gmock/include/gmock/gmock.h" | 33 #include "testing/gmock/include/gmock/gmock.h" |
34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 | 719 |
720 // good-manifest.com will not have been completed. | 720 // good-manifest.com will not have been completed. |
721 EXPECT_THAT(histogram.GetAllSamples("Precache.Fetch.PercentCompleted"), | 721 EXPECT_THAT(histogram.GetAllSamples("Precache.Fetch.PercentCompleted"), |
722 ElementsAre(base::Bucket(0, 1))); | 722 ElementsAre(base::Bucket(0, 1))); |
723 histogram.ExpectTotalCount("Precache.Fetch.TimeToComplete", 1); | 723 histogram.ExpectTotalCount("Precache.Fetch.TimeToComplete", 1); |
724 } | 724 } |
725 | 725 |
726 } // namespace | 726 } // namespace |
727 | 727 |
728 } // namespace precache | 728 } // namespace precache |
OLD | NEW |