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/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 pref_proxy_config_tracker_.reset( | 1028 pref_proxy_config_tracker_.reset( |
1029 ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs())); | 1029 ProxyServiceFactory::CreatePrefProxyConfigTracker(GetPrefs())); |
1030 } | 1030 } |
1031 return pref_proxy_config_tracker_.get(); | 1031 return pref_proxy_config_tracker_.get(); |
1032 } | 1032 } |
1033 | 1033 |
1034 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() { | 1034 chrome_browser_net::Predictor* ProfileImpl::GetNetworkPredictor() { |
1035 return predictor_; | 1035 return predictor_; |
1036 } | 1036 } |
1037 | 1037 |
1038 void ProfileImpl::ClearNetworkingHistorySince(base::Time time) { | 1038 void ProfileImpl::ClearNetworkingHistorySince(base::Time time, |
1039 io_data_.ClearNetworkingHistorySince(time); | 1039 const base::Closure& completion) { |
| 1040 io_data_.ClearNetworkingHistorySince(time, completion); |
1040 } | 1041 } |
1041 | 1042 |
1042 GURL ProfileImpl::GetHomePage() { | 1043 GURL ProfileImpl::GetHomePage() { |
1043 // --homepage overrides any preferences. | 1044 // --homepage overrides any preferences. |
1044 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 1045 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
1045 if (command_line.HasSwitch(switches::kHomePage)) { | 1046 if (command_line.HasSwitch(switches::kHomePage)) { |
1046 // TODO(evanm): clean up usage of DIR_CURRENT. | 1047 // TODO(evanm): clean up usage of DIR_CURRENT. |
1047 // http://code.google.com/p/chromium/issues/detail?id=60630 | 1048 // http://code.google.com/p/chromium/issues/detail?id=60630 |
1048 // For now, allow this code to call getcwd(). | 1049 // For now, allow this code to call getcwd(). |
1049 base::ThreadRestrictions::ScopedAllowIO allow_io; | 1050 base::ThreadRestrictions::ScopedAllowIO allow_io; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 if (!path.empty()) | 1114 if (!path.empty()) |
1114 *cache_path = path; | 1115 *cache_path = path; |
1115 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1116 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1116 prefs_->GetInteger(prefs::kDiskCacheSize); | 1117 prefs_->GetInteger(prefs::kDiskCacheSize); |
1117 } | 1118 } |
1118 | 1119 |
1119 base::Callback<ChromeURLDataManagerBackend*(void)> | 1120 base::Callback<ChromeURLDataManagerBackend*(void)> |
1120 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1121 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
1121 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1122 return io_data_.GetChromeURLDataManagerBackendGetter(); |
1122 } | 1123 } |
OLD | NEW |