Chromium Code Reviews| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 = |
| 174 pref_service->GetString(prefs::kGlobalDefaultCharset); | 174 pref_service->GetString(prefs::kDefaultCharset); |
|
Peter Kasting
2012/05/21 21:37:20
Nit: Will fit on one line
falken
2012/05/22 02:24:21
Done.
| |
| 175 params->accept_charset = | 175 params->accept_charset = |
| 176 net::HttpUtil::GenerateAcceptCharsetHeader(default_charset); | 176 net::HttpUtil::GenerateAcceptCharsetHeader(default_charset); |
| 177 | 177 |
| 178 // At this point, we don't know the charset of the referring page | 178 // 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 | 179 // where a url request originates from. This is used to get a suggested |
| 180 // filename from Content-Disposition header made of raw 8bit characters. | 180 // filename from Content-Disposition header made of raw 8bit characters. |
| 181 // Down the road, it can be overriden if it becomes known (for instance, | 181 // 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). | 182 // when download request is made through the context menu in a web page). |
| 183 // At the moment, it'll remain 'undeterministic' when a user | 183 // 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. | 184 // 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 } | 588 } |
| 589 | 589 |
| 590 void ProfileIOData::set_server_bound_cert_service( | 590 void ProfileIOData::set_server_bound_cert_service( |
| 591 net::ServerBoundCertService* server_bound_cert_service) const { | 591 net::ServerBoundCertService* server_bound_cert_service) const { |
| 592 server_bound_cert_service_.reset(server_bound_cert_service); | 592 server_bound_cert_service_.reset(server_bound_cert_service); |
| 593 } | 593 } |
| 594 | 594 |
| 595 void ProfileIOData::DestroyResourceContext() { | 595 void ProfileIOData::DestroyResourceContext() { |
| 596 resource_context_.reset(); | 596 resource_context_.reset(); |
| 597 } | 597 } |
| OLD | NEW |