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

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

Issue 8515027: Define the public version of the browser side RenderProcessHost interface. This interface is not ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
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 5
6 #include "chrome/browser/prefs/pref_service.h" 6 #include "chrome/browser/prefs/pref_service.h"
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/safe_browsing/malware_details.h" 8 #include "chrome/browser/safe_browsing/malware_details.h"
9 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 9 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 scoped_refptr<TestSafeBrowsingService> service_; 164 scoped_refptr<TestSafeBrowsingService> service_;
165 165
166 private: 166 private:
167 void InitResource(SafeBrowsingService::UnsafeResource* resource, 167 void InitResource(SafeBrowsingService::UnsafeResource* resource,
168 bool is_subresource, 168 bool is_subresource,
169 const GURL& url) { 169 const GURL& url) {
170 resource->client = this; 170 resource->client = this;
171 resource->url = url; 171 resource->url = url;
172 resource->is_subresource = is_subresource; 172 resource->is_subresource = is_subresource;
173 resource->threat_type = SafeBrowsingService::URL_MALWARE; 173 resource->threat_type = SafeBrowsingService::URL_MALWARE;
174 resource->render_process_host_id = contents()->GetRenderProcessHost()->id(); 174 resource->render_process_host_id = contents()->GetRenderProcessHost()->
175 GetID();
175 resource->render_view_id = contents()->render_view_host()->routing_id(); 176 resource->render_view_id = contents()->render_view_host()->routing_id();
176 } 177 }
177 178
178 UserResponse user_response_; 179 UserResponse user_response_;
179 TestSafeBrowsingBlockingPageFactory factory_; 180 TestSafeBrowsingBlockingPageFactory factory_;
180 content::TestBrowserThread ui_thread_; 181 content::TestBrowserThread ui_thread_;
181 content::TestBrowserThread io_thread_; 182 content::TestBrowserThread io_thread_;
182 }; 183 };
183 184
184 // Tests showing a blocking page for a malware page and not proceeding. 185 // Tests showing a blocking page for a malware page and not proceeding.
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 595
595 EXPECT_TRUE(profile->GetPrefs()->GetBoolean( 596 EXPECT_TRUE(profile->GetPrefs()->GetBoolean(
596 prefs::kSafeBrowsingReportingEnabled)); 597 prefs::kSafeBrowsingReportingEnabled));
597 598
598 // Simulate the user uncheck the report agreement checkbox. 599 // Simulate the user uncheck the report agreement checkbox.
599 sb_interstitial->SetReportingPreference(false); 600 sb_interstitial->SetReportingPreference(false);
600 601
601 EXPECT_FALSE(profile->GetPrefs()->GetBoolean( 602 EXPECT_FALSE(profile->GetPrefs()->GetBoolean(
602 prefs::kSafeBrowsingReportingEnabled)); 603 prefs::kSafeBrowsingReportingEnabled));
603 } 604 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698