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

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

Issue 2383063003: Add UMA metrics for the time it takes to read store from disk and apply update (Closed)
Patch Set: Reduce the max value and increase the number of buckets in histogram. Created 4 years, 2 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 | components/safe_browsing_db/v4_store.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) 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/local_database_manager.h" 5 #include "chrome/browser/safe_browsing/local_database_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 } 1209 }
1210 1210
1211 void LocalSafeBrowsingDatabaseManager::SafeBrowsingCheckDone( 1211 void LocalSafeBrowsingDatabaseManager::SafeBrowsingCheckDone(
1212 SafeBrowsingCheck* check) { 1212 SafeBrowsingCheck* check) {
1213 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1213 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1214 DCHECK(check); 1214 DCHECK(check);
1215 1215
1216 if (!enabled_) 1216 if (!enabled_)
1217 return; 1217 return;
1218 1218
1219 DVLOG(1) << "SafeBrowsingCheckDone";
1220 DCHECK(checks_.find(check) != checks_.end()); 1219 DCHECK(checks_.find(check) != checks_.end());
1221 if (check->client) 1220 if (check->client)
1222 check->OnSafeBrowsingResult(); 1221 check->OnSafeBrowsingResult();
1223 checks_.erase(check); 1222 checks_.erase(check);
1224 delete check; 1223 delete check;
1225 } 1224 }
1226 1225
1227 void LocalSafeBrowsingDatabaseManager::StartSafeBrowsingCheck( 1226 void LocalSafeBrowsingDatabaseManager::StartSafeBrowsingCheck(
1228 SafeBrowsingCheck* check, 1227 SafeBrowsingCheck* check,
1229 const base::Callback<std::vector<SBPrefix>(void)>& task) { 1228 const base::Callback<std::vector<SBPrefix>(void)>& task) {
(...skipping 10 matching lines...) Expand all
1240 FROM_HERE, base::Bind(&LocalSafeBrowsingDatabaseManager::TimeoutCallback, 1239 FROM_HERE, base::Bind(&LocalSafeBrowsingDatabaseManager::TimeoutCallback,
1241 check->weak_ptr_factory_->GetWeakPtr(), check), 1240 check->weak_ptr_factory_->GetWeakPtr(), check),
1242 check_timeout_); 1241 check_timeout_);
1243 } 1242 }
1244 1243
1245 bool LocalSafeBrowsingDatabaseManager::IsDownloadProtectionEnabled() const { 1244 bool LocalSafeBrowsingDatabaseManager::IsDownloadProtectionEnabled() const {
1246 return enable_download_protection_; 1245 return enable_download_protection_;
1247 } 1246 }
1248 1247
1249 } // namespace safe_browsing 1248 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698