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

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

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 months 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/pickle.h" 8 #include "base/pickle.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 base::Bind(&MalwareDetails::FinishCollection, report)); 208 base::Bind(&MalwareDetails::FinishCollection, report));
209 // Wait for the callback (SendSerializedMalwareDetails). 209 // Wait for the callback (SendSerializedMalwareDetails).
210 DVLOG(1) << "Waiting for SendSerializedMalwareDetails"; 210 DVLOG(1) << "Waiting for SendSerializedMalwareDetails";
211 base::RunLoop run_loop; 211 base::RunLoop run_loop;
212 ui_manager_->SetRunLoopToQuit(&run_loop); 212 ui_manager_->SetRunLoopToQuit(&run_loop);
213 run_loop.Run(); 213 run_loop.Run();
214 return ui_manager_->GetSerialized(); 214 return ui_manager_->GetSerialized();
215 } 215 }
216 216
217 HistoryService* history_service() { 217 HistoryService* history_service() {
218 return HistoryServiceFactory::GetForProfile(profile(), 218 return HistoryServiceFactory::GetForProfile(
219 Profile::EXPLICIT_ACCESS); 219 profile(), ServiceAccessType::EXPLICIT_ACCESS);
220 } 220 }
221 221
222 protected: 222 protected:
223 void InitResource(UnsafeResource* resource, 223 void InitResource(UnsafeResource* resource,
224 bool is_subresource, 224 bool is_subresource,
225 const GURL& url) { 225 const GURL& url) {
226 resource->url = url; 226 resource->url = url;
227 resource->is_subresource = is_subresource; 227 resource->is_subresource = is_subresource;
228 resource->threat_type = SB_THREAT_TYPE_URL_MALWARE; 228 resource->threat_type = SB_THREAT_TYPE_URL_MALWARE;
229 resource->render_process_host_id = 229 resource->render_process_host_id =
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 pb_resource = expected.add_resources(); 683 pb_resource = expected.add_resources();
684 pb_resource->set_id(2); 684 pb_resource->set_id(2);
685 pb_resource->set_parent_id(3); 685 pb_resource->set_parent_id(3);
686 pb_resource->set_url(kSecondRedirectURL); 686 pb_resource->set_url(kSecondRedirectURL);
687 pb_resource = expected.add_resources(); 687 pb_resource = expected.add_resources();
688 pb_resource->set_id(3); 688 pb_resource->set_id(3);
689 pb_resource->set_url(kFirstRedirectURL); 689 pb_resource->set_url(kFirstRedirectURL);
690 690
691 VerifyResults(actual, expected); 691 VerifyResults(actual, expected);
692 } 692 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/malware_details_history.cc ('k') | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698