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

Side by Side Diff: chrome/browser/renderer_host/download_resource_handler.h

Issue 6272025: Part 2 of repairing regressions to my old clang check plugins so Nico can (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright 2011 Created 9 years, 10 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 | « chrome/browser/remoting/setup_flow.h ('k') | chrome/browser/speech/speech_input_bubble.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_
6 #define CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 DOWNLOAD_URL_CHECKS_MAX 84 DOWNLOAD_URL_CHECKS_MAX
85 }; 85 };
86 86
87 ~DownloadResourceHandler(); 87 ~DownloadResourceHandler();
88 88
89 void StartPauseTimer(); 89 void StartPauseTimer();
90 90
91 void StartDownloadUrlCheck(); 91 void StartDownloadUrlCheck();
92 92
93 // Called when the result of checking a download URL is known. 93 // Called when the result of checking a download URL is known.
94 void OnDownloadUrlCheckResult(const GURL& url, 94 virtual void OnDownloadUrlCheckResult(
95 SafeBrowsingService::UrlCheckResult result); 95 const GURL& url,
96 SafeBrowsingService::UrlCheckResult result);
96 97
97 // A helper function that updates UMA for download url checks. 98 // A helper function that updates UMA for download url checks.
98 static void UpdateDownloadUrlCheckStats(SBStatsType stat_type); 99 static void UpdateDownloadUrlCheckStats(SBStatsType stat_type);
99 100
100 int download_id_; 101 int download_id_;
101 GlobalRequestID global_id_; 102 GlobalRequestID global_id_;
102 int render_view_id_; 103 int render_view_id_;
103 scoped_refptr<net::IOBuffer> read_buffer_; 104 scoped_refptr<net::IOBuffer> read_buffer_;
104 std::string content_disposition_; 105 std::string content_disposition_;
105 GURL url_; // final URL from which we're downloading. 106 GURL url_; // final URL from which we're downloading.
(...skipping 11 matching lines...) Expand all
117 base::TimeTicks download_start_time_; // used to collect stats. 118 base::TimeTicks download_start_time_; // used to collect stats.
118 119
119 static const int kReadBufSize = 32768; // bytes 120 static const int kReadBufSize = 32768; // bytes
120 static const size_t kLoadsToWrite = 100; // number of data buffers queued 121 static const size_t kLoadsToWrite = 100; // number of data buffers queued
121 static const int kThrottleTimeMs = 200; // milliseconds 122 static const int kThrottleTimeMs = 200; // milliseconds
122 123
123 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); 124 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler);
124 }; 125 };
125 126
126 #endif // CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ 127 #endif // CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/remoting/setup_flow.h ('k') | chrome/browser/speech/speech_input_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698