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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 // because the PrefService is owned by this class and lives on | 420 // because the PrefService is owned by this class and lives on |
421 // the same thread. | 421 // the same thread. |
422 prefs_->AddPrefInitObserver(base::Bind(&ProfileImpl::OnPrefsLoaded, | 422 prefs_->AddPrefInitObserver(base::Bind(&ProfileImpl::OnPrefsLoaded, |
423 base::Unretained(this))); | 423 base::Unretained(this))); |
424 } else { | 424 } else { |
425 // Prefs were loaded synchronously so we can continue directly. | 425 // Prefs were loaded synchronously so we can continue directly. |
426 OnPrefsLoaded(true); | 426 OnPrefsLoaded(true); |
427 } | 427 } |
428 } | 428 } |
429 | 429 |
| 430 void ProfileImpl::VisitDependencyManager( |
| 431 scoped_ptr<content::BrowserContextDependencyVisitor> visitor) { |
| 432 visitor->Visit(NULL); |
| 433 } |
| 434 |
| 435 graph::DependencyManagerInstance* ProfileImpl::GetDependencyManager() { |
| 436 return NULL; |
| 437 } |
| 438 |
430 void ProfileImpl::DoFinalInit() { | 439 void ProfileImpl::DoFinalInit() { |
431 PrefService* prefs = GetPrefs(); | 440 PrefService* prefs = GetPrefs(); |
432 pref_change_registrar_.Init(prefs); | 441 pref_change_registrar_.Init(prefs); |
433 pref_change_registrar_.Add( | 442 pref_change_registrar_.Add( |
434 prefs::kGoogleServicesUsername, | 443 prefs::kGoogleServicesUsername, |
435 base::Bind(&ProfileImpl::UpdateProfileUserNameCache, | 444 base::Bind(&ProfileImpl::UpdateProfileUserNameCache, |
436 base::Unretained(this))); | 445 base::Unretained(this))); |
437 pref_change_registrar_.Add( | 446 pref_change_registrar_.Add( |
438 prefs::kDefaultZoomLevel, | 447 prefs::kDefaultZoomLevel, |
439 base::Bind(&ProfileImpl::OnDefaultZoomLevelChanged, | 448 base::Bind(&ProfileImpl::OnDefaultZoomLevelChanged, |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 base::FilePath* cache_path, | 1146 base::FilePath* cache_path, |
1138 int* max_size) { | 1147 int* max_size) { |
1139 DCHECK(cache_path); | 1148 DCHECK(cache_path); |
1140 DCHECK(max_size); | 1149 DCHECK(max_size); |
1141 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); | 1150 base::FilePath path(prefs_->GetFilePath(prefs::kDiskCacheDir)); |
1142 if (!path.empty()) | 1151 if (!path.empty()) |
1143 *cache_path = path; | 1152 *cache_path = path; |
1144 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1153 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
1145 prefs_->GetInteger(prefs::kDiskCacheSize); | 1154 prefs_->GetInteger(prefs::kDiskCacheSize); |
1146 } | 1155 } |
OLD | NEW |