OLD | NEW |
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 "chrome/browser/safe_browsing/protocol_manager.h" | 5 #include "chrome/browser/safe_browsing/protocol_manager.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "base/test/scoped_mock_time_message_loop_task_runner.h" | 12 #include "base/test/scoped_mock_time_message_loop_task_runner.h" |
13 #include "base/threading/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "chrome/browser/safe_browsing/chunk.pb.h" | 15 #include "chrome/browser/safe_browsing/chunk.pb.h" |
16 #include "components/safe_browsing_db/safe_browsing_prefs.h" | 16 #include "components/safe_browsing/common/safe_browsing_prefs.h" |
17 #include "components/safe_browsing_db/safebrowsing.pb.h" | 17 #include "components/safe_browsing_db/safebrowsing.pb.h" |
18 #include "components/safe_browsing_db/util.h" | 18 #include "components/safe_browsing_db/util.h" |
19 #include "content/public/test/test_browser_thread_bundle.h" | 19 #include "content/public/test/test_browser_thread_bundle.h" |
20 #include "google_apis/google_api_keys.h" | 20 #include "google_apis/google_api_keys.h" |
21 #include "net/base/escape.h" | 21 #include "net/base/escape.h" |
22 #include "net/base/load_flags.h" | 22 #include "net/base/load_flags.h" |
23 #include "net/base/net_errors.h" | 23 #include "net/base/net_errors.h" |
24 #include "net/url_request/test_url_fetcher_factory.h" | 24 #include "net/url_request/test_url_fetcher_factory.h" |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "testing/gmock_mutant.h" | 26 #include "testing/gmock_mutant.h" |
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 | 1121 |
1122 EXPECT_FALSE(pm->IsUpdateScheduled()); | 1122 EXPECT_FALSE(pm->IsUpdateScheduled()); |
1123 | 1123 |
1124 // Invoke the AddChunksCallback to finish the update. | 1124 // Invoke the AddChunksCallback to finish the update. |
1125 mock_time_task_runner_->RunUntilIdle(); | 1125 mock_time_task_runner_->RunUntilIdle(); |
1126 | 1126 |
1127 EXPECT_TRUE(pm->IsUpdateScheduled()); | 1127 EXPECT_TRUE(pm->IsUpdateScheduled()); |
1128 } | 1128 } |
1129 | 1129 |
1130 } // namespace safe_browsing | 1130 } // namespace safe_browsing |
OLD | NEW |