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_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 pref_proxy_config_tracker_.reset( | 1080 pref_proxy_config_tracker_.reset( |
1081 ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs())); | 1081 ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs())); |
1082 } | 1082 } |
1083 return pref_proxy_config_tracker_.get(); | 1083 return pref_proxy_config_tracker_.get(); |
1084 } | 1084 } |
1085 | 1085 |
1086 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() { | 1086 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() { |
1087 return predictor_; | 1087 return predictor_; |
1088 } | 1088 } |
1089 | 1089 |
1090 void ProfileImpl::ClearNetworkingHistorySince(base::Time time) { | 1090 void ProfileImpl::ClearNetworkingHistorySince(base::Time time, |
1091 io_data_.ClearNetworkingHistorySince(time); | 1091 const base::Closure& completion) { |
| 1092 io_data_.ClearNetworkingHistorySince(time, completion); |
1092 } | 1093 } |
1093 | 1094 |
1094 GURL ProfileImpl::GetHomePage() { | 1095 GURL ProfileImpl::GetHomePage() { |
1095 // --homepage overrides any preferences. | 1096 // --homepage overrides any preferences. |
1096 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 1097 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
1097 if (command_line.HasSwitch(switches::kHomePage)) { | 1098 if (command_line.HasSwitch(switches::kHomePage)) { |
1098 // TODO(evanm): clean up usage of DIR_CURRENT. | 1099 // TODO(evanm): clean up usage of DIR_CURRENT. |
1099 // http://code.google.com/p/chromium/issues/detail?id=60630 | 1100 // http://code.google.com/p/chromium/issues/detail?id=60630 |
1100 // For now, allow this code to call getcwd(). | 1101 // For now, allow this code to call getcwd(). |
1101 base::ThreadRestrictions::ScopedAllowIO allow_io; | 1102 base::ThreadRestrictions::ScopedAllowIO allow_io; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 if (!path.empty()) | 1166 if (!path.empty()) |
1166 *cache_path = path; | 1167 *cache_path = path; |
1167 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1168 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1168 prefs_->GetInteger(prefs::kDiskCacheSize); | 1169 prefs_->GetInteger(prefs::kDiskCacheSize); |
1169 } | 1170 } |
1170 | 1171 |
1171 base::Callback<ChromeURLDataManagerBackend*(void)> | 1172 base::Callback<ChromeURLDataManagerBackend*(void)> |
1172 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1173 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
1173 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1174 return io_data_.GetChromeURLDataManagerBackendGetter(); |
1174 } | 1175 } |
OLD | NEW |