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

Side by Side Diff: chrome/browser/safe_browsing/protocol_manager.h

Issue 1563763002: Adds UMA histogram metrics for SafeBrowsing PVer4 methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@osb-pm-3
Patch Set: Add comment Created 4 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/protocol_manager.cc » ('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) 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 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
7 7
8 // A class that implements Chrome's interface with the SafeBrowsing protocol. 8 // A class that implements Chrome's interface with the SafeBrowsing protocol.
9 // See https://developers.google.com/safe-browsing/developers_guide_v2 for 9 // See https://developers.google.com/safe-browsing/developers_guide_v2 for
10 // protocol details. 10 // protocol details.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 // Gethash request failed (network error). 157 // Gethash request failed (network error).
158 GET_HASH_NETWORK_ERROR, 158 GET_HASH_NETWORK_ERROR,
159 159
160 // Gethash request returned HTTP result code other than 200 or 204. 160 // Gethash request returned HTTP result code other than 200 or 204.
161 GET_HASH_HTTP_ERROR, 161 GET_HASH_HTTP_ERROR,
162 162
163 // Gethash attempted during error backoff, no request sent. 163 // Gethash attempted during error backoff, no request sent.
164 GET_HASH_BACKOFF_ERROR, 164 GET_HASH_BACKOFF_ERROR,
165 165
166 // Gethash attempted before min wait duration elapsed, no request sent.
167 GET_HASH_MIN_WAIT_DURATION_ERROR,
168
166 // Memory space for histograms is determined by the max. ALWAYS 169 // Memory space for histograms is determined by the max. ALWAYS
167 // ADD NEW VALUES BEFORE THIS ONE. 170 // ADD NEW VALUES BEFORE THIS ONE.
168 GET_HASH_RESULT_MAX 171 GET_HASH_RESULT_MAX
169 }; 172 };
170 173
171 // Record a GetHash result. |is_download| indicates if the get 174 // Record a GetHash result. |is_download| indicates if the get
172 // hash is triggered by download related lookup. 175 // hash is triggered by download related lookup.
173 static void RecordGetHashResult(bool is_download, 176 static void RecordGetHashResult(bool is_download,
174 ResultType result_type); 177 ResultType result_type);
175 178
179 // Record a V4 GetHash result.
180 static void RecordGetV4HashResult(ResultType result_type);
181
176 // Record HTTP response code when there's no error in fetching an HTTP 182 // Record HTTP response code when there's no error in fetching an HTTP
177 // request, and the error code, when there is. 183 // request, and the error code, when there is.
178 // |metric_name| is the name of the UMA metric to record the response code or 184 // |metric_name| is the name of the UMA metric to record the response code or
179 // error code against, |status| represents the status of the HTTP request, and 185 // error code against, |status| represents the status of the HTTP request, and
180 // |response code| represents the HTTP response code received from the server. 186 // |response code| represents the HTTP response code received from the server.
181 static void RecordHttpResponseOrErrorCode( 187 static void RecordHttpResponseOrErrorCode(
182 const char* metric_name, const net::URLRequestStatus& status, 188 const char* metric_name, const net::URLRequestStatus& status,
183 int response_code); 189 int response_code);
184 190
185 // Returns whether another update is currently scheduled. 191 // Returns whether another update is currently scheduled.
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 AddChunksCallback callback) = 0; 517 AddChunksCallback callback) = 0;
512 518
513 // Delete chunks from the database. 519 // Delete chunks from the database.
514 virtual void DeleteChunks( 520 virtual void DeleteChunks(
515 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0; 521 scoped_ptr<std::vector<SBChunkDelete> > chunk_deletes) = 0;
516 }; 522 };
517 523
518 } // namespace safe_browsing 524 } // namespace safe_browsing
519 525
520 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_ 526 #endif // CHROME_BROWSER_SAFE_BROWSING_PROTOCOL_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/protocol_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698