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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 12805010: Implementing EvictedDomainCookieCounter to keep user metrics on cookie eviction and reinstatement. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanups; simplifying garbage collection; simplifying UMA; fixing off-by-1 meaning of max_size_. Created 7 years, 9 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 (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/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "chrome/common/startup_metric_utils.h" 54 #include "chrome/common/startup_metric_utils.h"
55 #include "chrome/common/url_constants.h" 55 #include "chrome/common/url_constants.h"
56 #include "content/public/browser/browser_thread.h" 56 #include "content/public/browser/browser_thread.h"
57 #include "content/public/browser/host_zoom_map.h" 57 #include "content/public/browser/host_zoom_map.h"
58 #include "content/public/browser/notification_service.h" 58 #include "content/public/browser/notification_service.h"
59 #include "content/public/browser/resource_context.h" 59 #include "content/public/browser/resource_context.h"
60 #include "extensions/common/constants.h" 60 #include "extensions/common/constants.h"
61 #include "net/base/server_bound_cert_service.h" 61 #include "net/base/server_bound_cert_service.h"
62 #include "net/cookies/canonical_cookie.h" 62 #include "net/cookies/canonical_cookie.h"
63 #include "net/cookies/cookie_monster.h" 63 #include "net/cookies/cookie_monster.h"
64 #include "net/cookies/evicted_domain_cookie_counter.h"
64 #include "net/http/http_transaction_factory.h" 65 #include "net/http/http_transaction_factory.h"
65 #include "net/http/http_util.h" 66 #include "net/http/http_util.h"
66 #include "net/proxy/proxy_config_service_fixed.h" 67 #include "net/proxy/proxy_config_service_fixed.h"
67 #include "net/proxy/proxy_script_fetcher_impl.h" 68 #include "net/proxy/proxy_script_fetcher_impl.h"
68 #include "net/proxy/proxy_service.h" 69 #include "net/proxy/proxy_service.h"
69 #include "net/url_request/data_protocol_handler.h" 70 #include "net/url_request/data_protocol_handler.h"
70 #include "net/url_request/file_protocol_handler.h" 71 #include "net/url_request/file_protocol_handler.h"
71 #include "net/url_request/ftp_protocol_handler.h" 72 #include "net/url_request/ftp_protocol_handler.h"
72 #include "net/url_request/protocol_intercept_job_factory.h" 73 #include "net/url_request/protocol_intercept_job_factory.h"
73 #include "net/url_request/url_request.h" 74 #include "net/url_request/url_request.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 params->path = profile->GetPath(); 220 params->path = profile->GetPath();
220 221
221 params->io_thread = g_browser_process->io_thread(); 222 params->io_thread = g_browser_process->io_thread();
222 223
223 params->cookie_settings = CookieSettings::Factory::GetForProfile(profile); 224 params->cookie_settings = CookieSettings::Factory::GetForProfile(profile);
224 params->ssl_config_service = profile->GetSSLConfigService(); 225 params->ssl_config_service = profile->GetSSLConfigService();
225 base::Callback<Profile*(void)> profile_getter = 226 base::Callback<Profile*(void)> profile_getter =
226 base::Bind(&GetProfileOnUI, g_browser_process->profile_manager(), 227 base::Bind(&GetProfileOnUI, g_browser_process->profile_manager(),
227 profile); 228 profile);
228 params->cookie_monster_delegate = 229 params->cookie_monster_delegate =
229 new ChromeCookieMonsterDelegate(profile_getter); 230 new net::EvictedDomainCookieCounter(
231 new ChromeCookieMonsterDelegate(profile_getter));
230 params->extension_info_map = 232 params->extension_info_map =
231 extensions::ExtensionSystem::Get(profile)->info_map(); 233 extensions::ExtensionSystem::Get(profile)->info_map();
232 234
233 if (predictors::ResourcePrefetchPredictor* predictor = 235 if (predictors::ResourcePrefetchPredictor* predictor =
234 predictors::ResourcePrefetchPredictorFactory::GetForProfile( 236 predictors::ResourcePrefetchPredictorFactory::GetForProfile(
235 profile)) { 237 profile)) {
236 resource_prefetch_predictor_observer_.reset( 238 resource_prefetch_predictor_observer_.reset(
237 new chrome_browser_net::ResourcePrefetchPredictorObserver(predictor)); 239 new chrome_browser_net::ResourcePrefetchPredictorObserver(predictor));
238 } 240 }
239 241
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 void ProfileIOData::SetCookieSettingsForTesting( 835 void ProfileIOData::SetCookieSettingsForTesting(
834 CookieSettings* cookie_settings) { 836 CookieSettings* cookie_settings) {
835 DCHECK(!cookie_settings_.get()); 837 DCHECK(!cookie_settings_.get());
836 cookie_settings_ = cookie_settings; 838 cookie_settings_ = cookie_settings;
837 } 839 }
838 840
839 void ProfileIOData::set_signin_names_for_testing( 841 void ProfileIOData::set_signin_names_for_testing(
840 SigninNamesOnIOThread* signin_names) { 842 SigninNamesOnIOThread* signin_names) {
841 signin_names_.reset(signin_names); 843 signin_names_.reset(signin_names);
842 } 844 }
OLDNEW
« no previous file with comments | « no previous file | net/cookies/canonical_cookie.h » ('j') | net/cookies/evicted_domain_cookie_counter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698