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

Side by Side Diff: chrome/browser/safe_browsing/malware_details_history.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 // Implementation of the MalwareDetailsRedirectsCollector class. 5 // Implementation of the MalwareDetailsRedirectsCollector class.
6 6
7 #include "chrome/browser/safe_browsing/malware_details_history.h" 7 #include "chrome/browser/safe_browsing/malware_details_history.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 void MalwareDetailsRedirectsCollector::GetRedirects(const GURL& url) { 84 void MalwareDetailsRedirectsCollector::GetRedirects(const GURL& url) {
85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
86 if (!profile_) { 86 if (!profile_) {
87 AllDone(); 87 AllDone();
88 return; 88 return;
89 } 89 }
90 90
91 HistoryService* history = HistoryServiceFactory::GetForProfile( 91 HistoryService* history = HistoryServiceFactory::GetForProfile(
92 profile_, Profile::EXPLICIT_ACCESS); 92 profile_, ServiceAccessType::EXPLICIT_ACCESS);
93 if (!history) { 93 if (!history) {
94 AllDone(); 94 AllDone();
95 return; 95 return;
96 } 96 }
97 97
98 history->QueryRedirectsTo( 98 history->QueryRedirectsTo(
99 url, 99 url,
100 base::Bind(&MalwareDetailsRedirectsCollector::OnGotQueryRedirectsTo, 100 base::Bind(&MalwareDetailsRedirectsCollector::OnGotQueryRedirectsTo,
101 base::Unretained(this), 101 base::Unretained(this),
102 url), 102 url),
(...skipping 19 matching lines...) Expand all
122 } 122 }
123 123
124 GetRedirects(*urls_it_); 124 GetRedirects(*urls_it_);
125 } 125 }
126 126
127 void MalwareDetailsRedirectsCollector::AllDone() { 127 void MalwareDetailsRedirectsCollector::AllDone() {
128 DVLOG(1) << "AllDone"; 128 DVLOG(1) << "AllDone";
129 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_); 129 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, callback_);
130 callback_.Reset(); 130 callback_.Reset();
131 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698