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

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

Issue 313073002: Clean-up coding style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 // Implementation of the MalwareDetails class. 5 // Implementation of the MalwareDetails class.
6 6
7 #include "chrome/browser/safe_browsing/malware_details.h" 7 #include "chrome/browser/safe_browsing/malware_details.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 return has_started_; 60 return has_started_;
61 } 61 }
62 62
63 MalwareDetailsCacheCollector::~MalwareDetailsCacheCollector() {} 63 MalwareDetailsCacheCollector::~MalwareDetailsCacheCollector() {}
64 64
65 // Fetch a URL and advance to the next one when done. 65 // Fetch a URL and advance to the next one when done.
66 void MalwareDetailsCacheCollector::OpenEntry() { 66 void MalwareDetailsCacheCollector::OpenEntry() {
67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
68 DVLOG(1) << "OpenEntry"; 68 DVLOG(1) << "OpenEntry";
69 69
70 if (resources_it_ == resources_->end()) { // We are done. 70 if (resources_it_ == resources_->end()) { // We are done.
Scott Hess - ex-Googler 2014/06/04 16:19:08 Or just remove the comment. Being at the end and
jaekyeom 2014/06/05 11:58:57 Done.
71 AllDone(true); 71 AllDone(true);
72 return; 72 return;
73 } 73 }
74 74
75 if (!request_context_getter_.get()) { 75 if (!request_context_getter_.get()) {
76 DVLOG(1) << "Missing request context getter"; 76 DVLOG(1) << "Missing request context getter";
77 AllDone(false); 77 AllDone(false);
78 return; 78 return;
79 } 79 }
80 80
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 base::Bind(&MalwareDetailsCacheCollector::OpenEntry, this)); 197 base::Bind(&MalwareDetailsCacheCollector::OpenEntry, this));
198 } 198 }
199 199
200 void MalwareDetailsCacheCollector::AllDone(bool success) { 200 void MalwareDetailsCacheCollector::AllDone(bool success) {
201 DVLOG(1) << "AllDone"; 201 DVLOG(1) << "AllDone";
202 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 202 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
203 *result_ = success; 203 *result_ = success;
204 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_); 204 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_);
205 callback_.Reset(); 205 callback_.Reset();
206 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698