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

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

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change Created 4 years, 4 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
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/protocol_manager.h" 5 #include "chrome/browser/safe_browsing/protocol_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 UMA_HISTOGRAM_SPARSE_SLOWLY( 186 UMA_HISTOGRAM_SPARSE_SLOWLY(
187 metric_name, status.is_success() ? response_code : status.error()); 187 metric_name, status.is_success() ? response_code : status.error());
188 } 188 }
189 189
190 bool SafeBrowsingProtocolManager::IsUpdateScheduled() const { 190 bool SafeBrowsingProtocolManager::IsUpdateScheduled() const {
191 return update_timer_.IsRunning(); 191 return update_timer_.IsRunning();
192 } 192 }
193 193
194 SafeBrowsingProtocolManager::~SafeBrowsingProtocolManager() { 194 SafeBrowsingProtocolManager::~SafeBrowsingProtocolManager() {
195 // Delete in-progress SafeBrowsing requests. 195 // Delete in-progress SafeBrowsing requests.
196 STLDeleteContainerPairFirstPointers(hash_requests_.begin(), 196 base::STLDeleteContainerPairFirstPointers(hash_requests_.begin(),
197 hash_requests_.end()); 197 hash_requests_.end());
198 hash_requests_.clear(); 198 hash_requests_.clear();
199 } 199 }
200 200
201 // We can only have one update or chunk request outstanding, but there may be 201 // We can only have one update or chunk request outstanding, but there may be
202 // multiple GetHash requests pending since we don't want to serialize them and 202 // multiple GetHash requests pending since we don't want to serialize them and
203 // slow down the user. 203 // slow down the user.
204 void SafeBrowsingProtocolManager::GetFullHash( 204 void SafeBrowsingProtocolManager::GetFullHash(
205 const std::vector<SBPrefix>& prefixes, 205 const std::vector<SBPrefix>& prefixes,
206 FullHashCallback callback, 206 FullHashCallback callback,
207 bool is_download, 207 bool is_download,
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 : callback(callback), is_download(is_download) {} 797 : callback(callback), is_download(is_download) {}
798 798
799 SafeBrowsingProtocolManager::FullHashDetails::FullHashDetails( 799 SafeBrowsingProtocolManager::FullHashDetails::FullHashDetails(
800 const FullHashDetails& other) = default; 800 const FullHashDetails& other) = default;
801 801
802 SafeBrowsingProtocolManager::FullHashDetails::~FullHashDetails() {} 802 SafeBrowsingProtocolManager::FullHashDetails::~FullHashDetails() {}
803 803
804 SafeBrowsingProtocolManagerDelegate::~SafeBrowsingProtocolManagerDelegate() {} 804 SafeBrowsingProtocolManagerDelegate::~SafeBrowsingProtocolManagerDelegate() {}
805 805
806 } // namespace safe_browsing 806 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/ping_manager.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698