Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: chrome/browser/safe_browsing/threat_details_unittest.cc

Issue 2540563002: Move SafeBrowsingUIManager::UnsafeResource to security_interstitials namespace (Closed)
Patch Set: rebase update Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 FillCacheBase(context_getter, /*use_https_threat_url=*/true); 144 FillCacheBase(context_getter, /*use_https_threat_url=*/true);
145 } 145 }
146 146
147 // Lets us provide a MockURLRequestContext with an HTTP Cache we pre-populate. 147 // Lets us provide a MockURLRequestContext with an HTTP Cache we pre-populate.
148 // Also exposes the constructor. 148 // Also exposes the constructor.
149 class ThreatDetailsWrap : public ThreatDetails { 149 class ThreatDetailsWrap : public ThreatDetails {
150 public: 150 public:
151 ThreatDetailsWrap( 151 ThreatDetailsWrap(
152 SafeBrowsingUIManager* ui_manager, 152 SafeBrowsingUIManager* ui_manager,
153 WebContents* web_contents, 153 WebContents* web_contents,
154 const SafeBrowsingUIManager::UnsafeResource& unsafe_resource, 154 const security_interstitials::UnsafeResource& unsafe_resource,
155 net::URLRequestContextGetter* request_context_getter) 155 net::URLRequestContextGetter* request_context_getter)
156 : ThreatDetails(ui_manager, web_contents, unsafe_resource) { 156 : ThreatDetails(ui_manager, web_contents, unsafe_resource) {
157 request_context_getter_ = request_context_getter; 157 request_context_getter_ = request_context_getter;
158 } 158 }
159 159
160 private: 160 private:
161 ~ThreatDetailsWrap() override {} 161 ~ThreatDetailsWrap() override {}
162 }; 162 };
163 163
164 class MockSafeBrowsingUIManager : public SafeBrowsingUIManager { 164 class MockSafeBrowsingUIManager : public SafeBrowsingUIManager {
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 pb_resource->set_parent_id(3); 979 pb_resource->set_parent_id(3);
980 pb_resource->set_url(kSecondRedirectURL); 980 pb_resource->set_url(kSecondRedirectURL);
981 pb_resource = expected.add_resources(); 981 pb_resource = expected.add_resources();
982 pb_resource->set_id(3); 982 pb_resource->set_id(3);
983 pb_resource->set_url(kFirstRedirectURL); 983 pb_resource->set_url(kFirstRedirectURL);
984 984
985 VerifyResults(actual, expected); 985 VerifyResults(actual, expected);
986 } 986 }
987 987
988 } // namespace safe_browsing 988 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/threat_details.cc ('k') | chrome/browser/safe_browsing/ui_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698