| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <map> | 5 #include <map> | 
| 6 #include <queue> | 6 #include <queue> | 
| 7 #include <string> | 7 #include <string> | 
| 8 | 8 | 
| 9 #include "base/callback.h" | 9 #include "base/callback.h" | 
| 10 #include "base/logging.h" | 10 #include "base/logging.h" | 
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" | 
| 12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" | 
| 13 #include "base/task.h" | 13 #include "base/task.h" | 
| 14 #include "base/time.h" | 14 #include "base/time.h" | 
| 15 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 15 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 
| 16 #include "chrome/common/safe_browsing/client_model.pb.h" | 16 #include "chrome/common/safe_browsing/client_model.pb.h" | 
| 17 #include "chrome/common/safe_browsing/csd.pb.h" | 17 #include "chrome/common/safe_browsing/csd.pb.h" | 
| 18 #include "chrome/test/testing_browser_process_test.h" | 18 #include "chrome/test/base/testing_browser_process_test.h" | 
| 19 #include "content/browser/browser_thread.h" | 19 #include "content/browser/browser_thread.h" | 
| 20 #include "content/common/url_fetcher.h" | 20 #include "content/common/url_fetcher.h" | 
| 21 #include "content/test/test_url_fetcher_factory.h" | 21 #include "content/test/test_url_fetcher_factory.h" | 
| 22 #include "crypto/sha2.h" | 22 #include "crypto/sha2.h" | 
| 23 #include "googleurl/src/gurl.h" | 23 #include "googleurl/src/gurl.h" | 
| 24 #include "net/url_request/url_request_status.h" | 24 #include "net/url_request/url_request_status.h" | 
| 25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" | 
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" | 
| 27 | 27 | 
| 28 using ::testing::Mock; | 28 using ::testing::Mock; | 
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 553   rule->set_weight(0.2f); | 553   rule->set_weight(0.2f); | 
| 554   EXPECT_FALSE(ClientSideDetectionService::ModelHasValidHashIds(model)); | 554   EXPECT_FALSE(ClientSideDetectionService::ModelHasValidHashIds(model)); | 
| 555 | 555 | 
| 556   rule->set_feature(2, 2); | 556   rule->set_feature(2, 2); | 
| 557   EXPECT_FALSE(ClientSideDetectionService::ModelHasValidHashIds(model)); | 557   EXPECT_FALSE(ClientSideDetectionService::ModelHasValidHashIds(model)); | 
| 558 | 558 | 
| 559   rule->set_feature(2, 1); | 559   rule->set_feature(2, 1); | 
| 560   EXPECT_TRUE(ClientSideDetectionService::ModelHasValidHashIds(model)); | 560   EXPECT_TRUE(ClientSideDetectionService::ModelHasValidHashIds(model)); | 
| 561 } | 561 } | 
| 562 }  // namespace safe_browsing | 562 }  // namespace safe_browsing | 
| OLD | NEW | 
|---|