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

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

Issue 306923005: Increase safebrowsing download check timeout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 29 matching lines...) Expand all
40 #include "net/cert/x509_certificate.h" 40 #include "net/cert/x509_certificate.h"
41 #include "net/http/http_status_code.h" 41 #include "net/http/http_status_code.h"
42 #include "net/url_request/url_fetcher.h" 42 #include "net/url_request/url_fetcher.h"
43 #include "net/url_request/url_fetcher_delegate.h" 43 #include "net/url_request/url_fetcher_delegate.h"
44 #include "net/url_request/url_request_context_getter.h" 44 #include "net/url_request/url_request_context_getter.h"
45 #include "net/url_request/url_request_status.h" 45 #include "net/url_request/url_request_status.h"
46 46
47 using content::BrowserThread; 47 using content::BrowserThread;
48 48
49 namespace { 49 namespace {
50 static const int64 kDownloadRequestTimeoutMs = 3000; 50 static const int64 kDownloadRequestTimeoutMs = 7000;
51 } // namespace 51 } // namespace
52 52
53 namespace safe_browsing { 53 namespace safe_browsing {
54 54
55 const char DownloadProtectionService::kDownloadRequestUrl[] = 55 const char DownloadProtectionService::kDownloadRequestUrl[] =
56 "https://sb-ssl.google.com/safebrowsing/clientreport/download"; 56 "https://sb-ssl.google.com/safebrowsing/clientreport/download";
57 57
58 namespace { 58 namespace {
59 ClientDownloadRequest::DownloadType GetDownloadType( 59 ClientDownloadRequest::DownloadType GetDownloadType(
60 const base::FilePath& file) { 60 const base::FilePath& file) {
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 GURL DownloadProtectionService::GetDownloadRequestUrl() { 1040 GURL DownloadProtectionService::GetDownloadRequestUrl() {
1041 GURL url(kDownloadRequestUrl); 1041 GURL url(kDownloadRequestUrl);
1042 std::string api_key = google_apis::GetAPIKey(); 1042 std::string api_key = google_apis::GetAPIKey();
1043 if (!api_key.empty()) 1043 if (!api_key.empty())
1044 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true)); 1044 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true));
1045 1045
1046 return url; 1046 return url;
1047 } 1047 }
1048 1048
1049 } // namespace safe_browsing 1049 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698