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

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

Issue 10386063: Move URLFetcherDelegate to net/ and split URLFetcher between net/ and content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head, fix win component build Created 8 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 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/download_protection_service.h" 5 #include "chrome/browser/safe_browsing/download_protection_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 fetcher_.reset(); 388 fetcher_.reset();
389 } 389 }
390 // Note: If there is no fetcher, then some callback is still holding a 390 // Note: If there is no fetcher, then some callback is still holding a
391 // reference to this object. We'll eventually wind up in some method on 391 // reference to this object. We'll eventually wind up in some method on
392 // the UI thread that will call FinishRequest() again. If FinishRequest() 392 // the UI thread that will call FinishRequest() again. If FinishRequest()
393 // is called a second time, it will be a no-op. 393 // is called a second time, it will be a no-op.
394 service_ = NULL; 394 service_ = NULL;
395 } 395 }
396 396
397 // From the content::URLFetcherDelegate interface. 397 // From the content::URLFetcherDelegate interface.
398 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE { 398 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE {
399 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 399 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
400 DCHECK_EQ(source, fetcher_.get()); 400 DCHECK_EQ(source, fetcher_.get());
401 VLOG(2) << "Received a response for URL: " 401 VLOG(2) << "Received a response for URL: "
402 << info_.download_url_chain.back() << ": success=" 402 << info_.download_url_chain.back() << ": success="
403 << source->GetStatus().is_success() << " response_code=" 403 << source->GetStatus().is_success() << " response_code="
404 << source->GetResponseCode(); 404 << source->GetResponseCode();
405 DownloadCheckResultReason reason = REASON_SERVER_PING_FAILED; 405 DownloadCheckResultReason reason = REASON_SERVER_PING_FAILED;
406 DownloadCheckResult result = SAFE; 406 DownloadCheckResult result = SAFE;
407 if (source->GetStatus().is_success() && 407 if (source->GetStatus().is_success() &&
408 net::HTTP_OK == source->GetResponseCode()) { 408 net::HTTP_OK == source->GetResponseCode()) {
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 857
858 std::string issuer_fp = base::HexEncode(issuer.fingerprint().data, 858 std::string issuer_fp = base::HexEncode(issuer.fingerprint().data,
859 sizeof(issuer.fingerprint().data)); 859 sizeof(issuer.fingerprint().data));
860 for (std::set<std::string>::iterator it = paths_to_check.begin(); 860 for (std::set<std::string>::iterator it = paths_to_check.begin();
861 it != paths_to_check.end(); ++it) { 861 it != paths_to_check.end(); ++it) {
862 whitelist_strings->push_back("cert/" + issuer_fp + *it); 862 whitelist_strings->push_back("cert/" + issuer_fp + *it);
863 } 863 }
864 } 864 }
865 865
866 } // namespace safe_browsing 866 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/client_side_detection_service.cc ('k') | chrome/browser/safe_browsing/malware_details_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698