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/client_side_model_loader.h" | 5 #include "chrome/browser/safe_browsing/client_side_model_loader.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/metrics/field_trial.h" | 15 #include "base/metrics/field_trial.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "chrome/common/safe_browsing/client_model.pb.h" | 19 #include "chrome/common/safe_browsing/client_model.pb.h" |
20 #include "chrome/common/safe_browsing/csd.pb.h" | 20 #include "components/safe_browsing/csd.pb.h" |
21 #include "components/variations/variations_associated_data.h" | 21 #include "components/variations/variations_associated_data.h" |
22 #include "content/public/test/test_browser_thread_bundle.h" | 22 #include "content/public/test/test_browser_thread_bundle.h" |
23 #include "net/http/http_status_code.h" | 23 #include "net/http/http_status_code.h" |
24 #include "net/url_request/test_url_fetcher_factory.h" | 24 #include "net/url_request/test_url_fetcher_factory.h" |
25 #include "net/url_request/url_request_status.h" | 25 #include "net/url_request/url_request_status.h" |
26 #include "testing/gmock/include/gmock/gmock.h" | 26 #include "testing/gmock/include/gmock/gmock.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 #include "url/gurl.h" | 28 #include "url/gurl.h" |
29 | 29 |
30 using ::testing::Invoke; | 30 using ::testing::Invoke; |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 EXPECT_FALSE(ModelLoader::ModelHasValidHashIds(model)); | 337 EXPECT_FALSE(ModelLoader::ModelHasValidHashIds(model)); |
338 | 338 |
339 rule->set_feature(2, 2); | 339 rule->set_feature(2, 2); |
340 EXPECT_FALSE(ModelLoader::ModelHasValidHashIds(model)); | 340 EXPECT_FALSE(ModelLoader::ModelHasValidHashIds(model)); |
341 | 341 |
342 rule->set_feature(2, 1); | 342 rule->set_feature(2, 1); |
343 EXPECT_TRUE(ModelLoader::ModelHasValidHashIds(model)); | 343 EXPECT_TRUE(ModelLoader::ModelHasValidHashIds(model)); |
344 } | 344 } |
345 | 345 |
346 } // namespace safe_browsing | 346 } // namespace safe_browsing |
OLD | NEW |