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

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

Issue 97683002: Move kFtpScheme into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 "chrome/browser/safe_browsing/database_manager.h" 5 #include "chrome/browser/safe_browsing/database_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 SIDE_EFFECT_FREE_WHITELIST_STATUS_MAX); 199 SIDE_EFFECT_FREE_WHITELIST_STATUS_MAX);
200 } 200 }
201 201
202 SafeBrowsingDatabaseManager::~SafeBrowsingDatabaseManager() { 202 SafeBrowsingDatabaseManager::~SafeBrowsingDatabaseManager() {
203 // We should have already been shut down. If we're still enabled, then the 203 // We should have already been shut down. If we're still enabled, then the
204 // database isn't going to be closed properly, which could lead to corruption. 204 // database isn't going to be closed properly, which could lead to corruption.
205 DCHECK(!enabled_); 205 DCHECK(!enabled_);
206 } 206 }
207 207
208 bool SafeBrowsingDatabaseManager::CanCheckUrl(const GURL& url) const { 208 bool SafeBrowsingDatabaseManager::CanCheckUrl(const GURL& url) const {
209 return url.SchemeIs(chrome::kFtpScheme) || 209 return url.SchemeIs(content::kFtpScheme) ||
210 url.SchemeIs(content::kHttpScheme) || 210 url.SchemeIs(content::kHttpScheme) ||
211 url.SchemeIs(content::kHttpsScheme); 211 url.SchemeIs(content::kHttpsScheme);
212 } 212 }
213 213
214 bool SafeBrowsingDatabaseManager::CheckDownloadUrl( 214 bool SafeBrowsingDatabaseManager::CheckDownloadUrl(
215 const std::vector<GURL>& url_chain, 215 const std::vector<GURL>& url_chain,
216 Client* client) { 216 Client* client) {
217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 217 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
218 if (!enabled_ || !enable_download_protection_) 218 if (!enabled_ || !enable_download_protection_)
219 return true; 219 return true;
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 new base::WeakPtrFactory<SafeBrowsingDatabaseManager>(this)); 1109 new base::WeakPtrFactory<SafeBrowsingDatabaseManager>(this));
1110 checks_.insert(check); 1110 checks_.insert(check);
1111 1111
1112 safe_browsing_thread_->message_loop()->PostTask(FROM_HERE, task); 1112 safe_browsing_thread_->message_loop()->PostTask(FROM_HERE, task);
1113 1113
1114 base::MessageLoop::current()->PostDelayedTask(FROM_HERE, 1114 base::MessageLoop::current()->PostDelayedTask(FROM_HERE,
1115 base::Bind(&SafeBrowsingDatabaseManager::TimeoutCallback, 1115 base::Bind(&SafeBrowsingDatabaseManager::TimeoutCallback,
1116 check->timeout_factory_->GetWeakPtr(), check), 1116 check->timeout_factory_->GetWeakPtr(), check),
1117 check_timeout_); 1117 check_timeout_);
1118 } 1118 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/offline_resource_throttle.cc ('k') | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698