| 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_detection_service.h" | 5 #include "chrome/browser/safe_browsing/client_side_detection_service.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 <queue> | 11 #include <queue> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/macros.h" | 17 #include "base/macros.h" |
| 18 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
| 19 #include "base/message_loop/message_loop.h" | 19 #include "base/message_loop/message_loop.h" |
| 20 #include "base/metrics/field_trial.h" | 20 #include "base/metrics/field_trial.h" |
| 21 #include "base/run_loop.h" | 21 #include "base/run_loop.h" |
| 22 #include "base/strings/string_number_conversions.h" | 22 #include "base/strings/string_number_conversions.h" |
| 23 #include "base/time/time.h" | 23 #include "base/time/time.h" |
| 24 #include "chrome/common/safe_browsing/client_model.pb.h" | 24 #include "chrome/common/safe_browsing/client_model.pb.h" |
| 25 #include "chrome/common/safe_browsing/csd.pb.h" | 25 #include "components/safe_browsing/csd.pb.h" |
| 26 #include "components/variations/variations_associated_data.h" | 26 #include "components/variations/variations_associated_data.h" |
| 27 #include "content/public/test/test_browser_thread.h" | 27 #include "content/public/test/test_browser_thread.h" |
| 28 #include "crypto/sha2.h" | 28 #include "crypto/sha2.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 "testing/gmock/include/gmock/gmock.h" | 32 #include "testing/gmock/include/gmock/gmock.h" |
| 33 #include "testing/gtest/include/gtest/gtest.h" | 33 #include "testing/gtest/include/gtest/gtest.h" |
| 34 #include "url/gurl.h" | 34 #include "url/gurl.h" |
| 35 | 35 |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 | 481 |
| 482 // Check that disabling again doesn't request the model. | 482 // Check that disabling again doesn't request the model. |
| 483 csd_service_->SetEnabledAndRefreshState(false); | 483 csd_service_->SetEnabledAndRefreshState(false); |
| 484 // No calls expected. | 484 // No calls expected. |
| 485 base::RunLoop().RunUntilIdle(); | 485 base::RunLoop().RunUntilIdle(); |
| 486 Mock::VerifyAndClearExpectations(service); | 486 Mock::VerifyAndClearExpectations(service); |
| 487 Mock::VerifyAndClearExpectations(loader_1); | 487 Mock::VerifyAndClearExpectations(loader_1); |
| 488 Mock::VerifyAndClearExpectations(loader_2); | 488 Mock::VerifyAndClearExpectations(loader_2); |
| 489 } | 489 } |
| 490 } // namespace safe_browsing | 490 } // namespace safe_browsing |
| OLD | NEW |