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

Unified Diff: chrome/browser/safe_browsing/malware_details_unittest.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/safe_browsing/malware_details_cache.cc ('k') | chrome/browser/safe_browsing/ping_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/malware_details_unittest.cc
diff --git a/chrome/browser/safe_browsing/malware_details_unittest.cc b/chrome/browser/safe_browsing/malware_details_unittest.cc
index 10daca1a4057d21b871055d3b6bfd69489432538..ca1f6581232ffec445bea10894f1114f0aa9d09f 100644
--- a/chrome/browser/safe_browsing/malware_details_unittest.cc
+++ b/chrome/browser/safe_browsing/malware_details_unittest.cc
@@ -76,7 +76,7 @@ void WriteHeaders(disk_cache::Entry* entry, const std::string headers) {
int len = static_cast<int>(pickle.size());
net::TestCompletionCallback cb;
- int rv = entry->WriteData(0, 0, buf, len, cb.callback(), true);
+ int rv = entry->WriteData(0, 0, buf.get(), len, cb.callback(), true);
ASSERT_EQ(len, cb.GetResult(rv));
}
@@ -89,7 +89,7 @@ void WriteData(disk_cache::Entry* entry, const std::string data) {
memcpy(buf->data(), data.data(), data.length());
net::TestCompletionCallback cb;
- int rv = entry->WriteData(1, 0, buf, len, cb.callback(), true);
+ int rv = entry->WriteData(1, 0, buf.get(), len, cb.callback(), true);
ASSERT_EQ(len, cb.GetResult(rv));
}
@@ -333,10 +333,10 @@ TEST_F(MalwareDetailsTest, MalwareSubResource) {
UnsafeResource resource;
InitResource(&resource, true, GURL(kMalwareURL));
- scoped_refptr<MalwareDetailsWrap> report = new MalwareDetailsWrap(
- ui_manager_, web_contents(), resource, NULL);
+ scoped_refptr<MalwareDetailsWrap> report =
+ new MalwareDetailsWrap(ui_manager_.get(), web_contents(), resource, NULL);
- std::string serialized = WaitForSerializedReport(report);
+ std::string serialized = WaitForSerializedReport(report.get());
ClientMalwareReportRequest actual;
actual.ParseFromString(serialized);
@@ -369,7 +369,7 @@ TEST_F(MalwareDetailsTest, MalwareSubResourceWithOriginalUrl) {
scoped_refptr<MalwareDetailsWrap> report = new MalwareDetailsWrap(
ui_manager_.get(), web_contents(), resource, NULL);
- std::string serialized = WaitForSerializedReport(report);
+ std::string serialized = WaitForSerializedReport(report.get());
ClientMalwareReportRequest actual;
actual.ParseFromString(serialized);
@@ -423,7 +423,7 @@ TEST_F(MalwareDetailsTest, MalwareDOMDetails) {
base::MessageLoop::current()->RunUntilIdle();
- std::string serialized = WaitForSerializedReport(report);
+ std::string serialized = WaitForSerializedReport(report.get());
ClientMalwareReportRequest actual;
actual.ParseFromString(serialized);
@@ -463,7 +463,7 @@ TEST_F(MalwareDetailsTest, NotPublicUrl) {
scoped_refptr<MalwareDetailsWrap> report = new MalwareDetailsWrap(
ui_manager_.get(), web_contents(), resource, NULL);
- std::string serialized = WaitForSerializedReport(report);
+ std::string serialized = WaitForSerializedReport(report.get());
ClientMalwareReportRequest actual;
actual.ParseFromString(serialized);
@@ -495,7 +495,7 @@ TEST_F(MalwareDetailsTest, MalwareWithRedirectUrl) {
scoped_refptr<MalwareDetailsWrap> report = new MalwareDetailsWrap(
ui_manager_.get(), web_contents(), resource, NULL);
- std::string serialized = WaitForSerializedReport(report);
+ std::string serialized = WaitForSerializedReport(report.get());
ClientMalwareReportRequest actual;
actual.ParseFromString(serialized);
@@ -556,7 +556,7 @@ TEST_F(MalwareDetailsTest, HTTPCache) {
base::MessageLoop::current()->RunUntilIdle();
DVLOG(1) << "Getting serialized report";
- std::string serialized = WaitForSerializedReport(report);
+ std::string serialized = WaitForSerializedReport(report.get());
ClientMalwareReportRequest actual;
actual.ParseFromString(serialized);
@@ -627,7 +627,7 @@ TEST_F(MalwareDetailsTest, HTTPCacheNoEntries) {
base::MessageLoop::current()->RunUntilIdle();
DVLOG(1) << "Getting serialized report";
- std::string serialized = WaitForSerializedReport(report);
+ std::string serialized = WaitForSerializedReport(report.get());
ClientMalwareReportRequest actual;
actual.ParseFromString(serialized);
@@ -675,7 +675,7 @@ TEST_F(MalwareDetailsTest, HistoryServiceUrls) {
// Let the redirects callbacks complete.
base::MessageLoop::current()->RunUntilIdle();
- std::string serialized = WaitForSerializedReport(report);
+ std::string serialized = WaitForSerializedReport(report.get());
ClientMalwareReportRequest actual;
actual.ParseFromString(serialized);
« no previous file with comments | « chrome/browser/safe_browsing/malware_details_cache.cc ('k') | chrome/browser/safe_browsing/ping_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698