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

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

Issue 6773006: Add enableReferrers and enableHyperlinkAuditing to contentSettings.misc API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix grammar Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 10 #include "base/command_line.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } // namespace 122 } // namespace
123 123
124 void ProfileIOData::InitializeProfileParams(Profile* profile, 124 void ProfileIOData::InitializeProfileParams(Profile* profile,
125 ProfileParams* params) { 125 ProfileParams* params) {
126 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 126 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
127 PrefService* pref_service = profile->GetPrefs(); 127 PrefService* pref_service = profile->GetPrefs();
128 128
129 params->is_incognito = profile->IsOffTheRecord(); 129 params->is_incognito = profile->IsOffTheRecord();
130 params->clear_local_state_on_exit = 130 params->clear_local_state_on_exit =
131 pref_service->GetBoolean(prefs::kClearSiteDataOnExit); 131 pref_service->GetBoolean(prefs::kClearSiteDataOnExit);
132 params->enable_referrers.reset(new BooleanPrefMember());
133 params->enable_referrers->Init(prefs::kEnableReferrers,
134 profile->GetPrefs(),
135 NULL);
136 params->enable_referrers->MoveToThread(BrowserThread::IO);
137 params->enable_referrers->ObserveProfileDestruction(profile);
willchan no longer on Chromium 2011/04/05 13:10:41 Why is this necessary? The associated ProfileIODat
Bernhard Bauer 2011/04/05 14:49:02 Sadly, not soon enough. When the PrefMember is des
willchan no longer on Chromium 2011/04/05 15:06:18 Wait, but this BooleanPrefMember lives in the Chro
Bernhard Bauer 2011/04/05 16:12:59 We specifically added support for reading prefs wi
willchan no longer on Chromium 2011/04/05 17:12:51 Which PrefService? Sorry, there seem to be a whole
Bernhard Bauer 2011/04/05 18:24:47 The one returned by |GetPrefs()| (which is the inc
willchan no longer on Chromium 2011/04/08 19:10:37 I don't think I like adding implicit notifications
132 138
133 params->appcache_service = profile->GetAppCacheService(); 139 params->appcache_service = profile->GetAppCacheService();
134 140
135 // Set up Accept-Language and Accept-Charset header values 141 // Set up Accept-Language and Accept-Charset header values
136 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader( 142 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader(
137 pref_service->GetString(prefs::kAcceptLanguages)); 143 pref_service->GetString(prefs::kAcceptLanguages));
138 std::string default_charset = pref_service->GetString(prefs::kDefaultCharset); 144 std::string default_charset = pref_service->GetString(prefs::kDefaultCharset);
139 params->accept_charset = 145 params->accept_charset =
140 net::HttpUtil::GenerateAcceptCharsetHeader(default_charset); 146 net::HttpUtil::GenerateAcceptCharsetHeader(default_charset);
141 147
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 context->set_transport_security_state( 270 context->set_transport_security_state(
265 profile_params.transport_security_state); 271 profile_params.transport_security_state);
266 context->set_ssl_config_service(profile_params.ssl_config_service); 272 context->set_ssl_config_service(profile_params.ssl_config_service);
267 context->set_database_tracker(profile_params.database_tracker); 273 context->set_database_tracker(profile_params.database_tracker);
268 context->set_appcache_service(profile_params.appcache_service); 274 context->set_appcache_service(profile_params.appcache_service);
269 context->set_blob_storage_context(profile_params.blob_storage_context); 275 context->set_blob_storage_context(profile_params.blob_storage_context);
270 context->set_file_system_context(profile_params.file_system_context); 276 context->set_file_system_context(profile_params.file_system_context);
271 context->set_extension_info_map(profile_params.extension_info_map); 277 context->set_extension_info_map(profile_params.extension_info_map);
272 context->set_prerender_manager(profile_params.prerender_manager); 278 context->set_prerender_manager(profile_params.prerender_manager);
273 } 279 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698