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

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

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/history/history_backend.h" 10 #include "chrome/browser/history/history_backend.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 virtual ~MalwareDetailsWrap() {} 147 virtual ~MalwareDetailsWrap() {}
148 }; 148 };
149 149
150 class MockSafeBrowsingUIManager : public SafeBrowsingUIManager { 150 class MockSafeBrowsingUIManager : public SafeBrowsingUIManager {
151 public: 151 public:
152 // The safe browsing UI manager does not need a service for this test. 152 // The safe browsing UI manager does not need a service for this test.
153 MockSafeBrowsingUIManager() 153 MockSafeBrowsingUIManager()
154 : SafeBrowsingUIManager(NULL) {} 154 : SafeBrowsingUIManager(NULL) {}
155 155
156 // When the MalwareDetails is done, this is called. 156 // When the MalwareDetails is done, this is called.
157 virtual void SendSerializedMalwareDetails(const std::string& serialized) { 157 virtual void SendSerializedMalwareDetails(
158 const std::string& serialized) OVERRIDE {
158 DVLOG(1) << "SendSerializedMalwareDetails"; 159 DVLOG(1) << "SendSerializedMalwareDetails";
159 // Notify WaitForSerializedReport. 160 // Notify WaitForSerializedReport.
160 BrowserThread::PostTask(BrowserThread::IO, 161 BrowserThread::PostTask(BrowserThread::IO,
161 FROM_HERE, 162 FROM_HERE,
162 base::Bind(&QuitUIMessageLoop)); 163 base::Bind(&QuitUIMessageLoop));
163 serialized_ = serialized; 164 serialized_ = serialized;
164 } 165 }
165 166
166 const std::string& GetSerialized() { 167 const std::string& GetSerialized() {
167 return serialized_; 168 return serialized_;
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 pb_resource = expected.add_resources(); 694 pb_resource = expected.add_resources();
694 pb_resource->set_id(2); 695 pb_resource->set_id(2);
695 pb_resource->set_parent_id(3); 696 pb_resource->set_parent_id(3);
696 pb_resource->set_url(kSecondRedirectURL); 697 pb_resource->set_url(kSecondRedirectURL);
697 pb_resource = expected.add_resources(); 698 pb_resource = expected.add_resources();
698 pb_resource->set_id(3); 699 pb_resource->set_id(3);
699 pb_resource->set_url(kFirstRedirectURL); 700 pb_resource->set_url(kFirstRedirectURL);
700 701
701 VerifyResults(actual, expected); 702 VerifyResults(actual, expected);
702 } 703 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698