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

Side by Side Diff: chrome/browser/net/evicted_domain_cookie_counter.cc

Issue 333723002: Componentize google_util (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + build fix 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/net/evicted_domain_cookie_counter.h" 5 #include "chrome/browser/net/evicted_domain_cookie_counter.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/stl_util.h" 11 #include "base/stl_util.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "chrome/browser/google/google_util.h" 13 #include "components/google/core/browser/google_util.h"
14 #include "net/cookies/canonical_cookie.h" 14 #include "net/cookies/canonical_cookie.h"
15 15
16 namespace chrome_browser_net { 16 namespace chrome_browser_net {
17 17
18 using base::Time; 18 using base::Time;
19 using base::TimeDelta; 19 using base::TimeDelta;
20 20
21 namespace { 21 namespace {
22 22
23 const size_t kMaxEvictedDomainCookies = 500; 23 const size_t kMaxEvictedDomainCookies = 500;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 EvictedCookieMap::iterator it = evicted_cookies_.find(key); 198 EvictedCookieMap::iterator it = evicted_cookies_.find(key);
199 if (it != evicted_cookies_.end()) { 199 if (it != evicted_cookies_.end()) {
200 if (!it->second->is_expired(current_time)) // Reinstatement. 200 if (!it->second->is_expired(current_time)) // Reinstatement.
201 cookie_counter_delegate_->Report(*it->second, current_time); 201 cookie_counter_delegate_->Report(*it->second, current_time);
202 delete it->second; 202 delete it->second;
203 evicted_cookies_.erase(it); 203 evicted_cookies_.erase(it);
204 } 204 }
205 } 205 }
206 206
207 } // namespace chrome_browser_net 207 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/dns_probe_browsertest.cc ('k') | chrome/browser/plugins/plugin_infobar_delegates.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698