OLD | NEW |
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 PrefService* pref_service = profile->GetPrefs(); | 163 PrefService* pref_service = profile->GetPrefs(); |
164 | 164 |
165 scoped_ptr<ProfileParams> params(new ProfileParams); | 165 scoped_ptr<ProfileParams> params(new ProfileParams); |
166 params->path = profile->GetPath(); | 166 params->path = profile->GetPath(); |
167 params->clear_local_state_on_exit = | 167 params->clear_local_state_on_exit = |
168 pref_service->GetBoolean(prefs::kClearSiteDataOnExit); | 168 pref_service->GetBoolean(prefs::kClearSiteDataOnExit); |
169 | 169 |
170 // Set up Accept-Language and Accept-Charset header values | 170 // Set up Accept-Language and Accept-Charset header values |
171 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader( | 171 params->accept_language = net::HttpUtil::GenerateAcceptLanguageHeader( |
172 pref_service->GetString(prefs::kAcceptLanguages)); | 172 pref_service->GetString(prefs::kAcceptLanguages)); |
173 std::string default_charset = | 173 std::string default_charset = pref_service->GetString(prefs::kDefaultCharset); |
174 pref_service->GetString(prefs::kGlobalDefaultCharset); | |
175 params->accept_charset = | 174 params->accept_charset = |
176 net::HttpUtil::GenerateAcceptCharsetHeader(default_charset); | 175 net::HttpUtil::GenerateAcceptCharsetHeader(default_charset); |
177 | 176 |
178 // At this point, we don't know the charset of the referring page | 177 // At this point, we don't know the charset of the referring page |
179 // where a url request originates from. This is used to get a suggested | 178 // where a url request originates from. This is used to get a suggested |
180 // filename from Content-Disposition header made of raw 8bit characters. | 179 // filename from Content-Disposition header made of raw 8bit characters. |
181 // Down the road, it can be overriden if it becomes known (for instance, | 180 // Down the road, it can be overriden if it becomes known (for instance, |
182 // when download request is made through the context menu in a web page). | 181 // when download request is made through the context menu in a web page). |
183 // At the moment, it'll remain 'undeterministic' when a user | 182 // At the moment, it'll remain 'undeterministic' when a user |
184 // types a URL in the omnibar or click on a download link in a page. | 183 // types a URL in the omnibar or click on a download link in a page. |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 } | 587 } |
589 | 588 |
590 void ProfileIOData::set_server_bound_cert_service( | 589 void ProfileIOData::set_server_bound_cert_service( |
591 net::ServerBoundCertService* server_bound_cert_service) const { | 590 net::ServerBoundCertService* server_bound_cert_service) const { |
592 server_bound_cert_service_.reset(server_bound_cert_service); | 591 server_bound_cert_service_.reset(server_bound_cert_service); |
593 } | 592 } |
594 | 593 |
595 void ProfileIOData::DestroyResourceContext() { | 594 void ProfileIOData::DestroyResourceContext() { |
596 resource_context_.reset(); | 595 resource_context_.reset(); |
597 } | 596 } |
OLD | NEW |