| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "chrome/browser/safe_browsing/v4_protocol_manager.h" | |
| 12 #include "components/safe_browsing_db/safebrowsing.pb.h" | 11 #include "components/safe_browsing_db/safebrowsing.pb.h" |
| 13 #include "components/safe_browsing_db/util.h" | 12 #include "components/safe_browsing_db/util.h" |
| 13 #include "components/safe_browsing_db/v4_protocol_manager.h" |
| 14 #include "net/base/escape.h" | 14 #include "net/base/escape.h" |
| 15 #include "net/base/load_flags.h" | 15 #include "net/base/load_flags.h" |
| 16 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
| 17 #include "net/url_request/test_url_fetcher_factory.h" | 17 #include "net/url_request/test_url_fetcher_factory.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 19 |
| 20 using base::Time; | 20 using base::Time; |
| 21 using base::TimeDelta; | 21 using base::TimeDelta; |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 // Serialize. | 423 // Serialize. |
| 424 std::string res_data; | 424 std::string res_data; |
| 425 res.SerializeToString(&res_data); | 425 res.SerializeToString(&res_data); |
| 426 | 426 |
| 427 std::vector<SBFullHashResult> full_hashes; | 427 std::vector<SBFullHashResult> full_hashes; |
| 428 base::TimeDelta cache_lifetime; | 428 base::TimeDelta cache_lifetime; |
| 429 EXPECT_FALSE(pm->ParseHashResponse(res_data, &full_hashes, &cache_lifetime)); | 429 EXPECT_FALSE(pm->ParseHashResponse(res_data, &full_hashes, &cache_lifetime)); |
| 430 } | 430 } |
| 431 | 431 |
| 432 } // namespace safe_browsing | 432 } // namespace safe_browsing |
| OLD | NEW |