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/extensions/external_policy_loader.h" | 5 #include "chrome/browser/extensions/external_policy_loader.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 DCHECK(type == chrome::NOTIFICATION_PROFILE_DESTROYED) << | 49 DCHECK(type == chrome::NOTIFICATION_PROFILE_DESTROYED) << |
50 "Unexpected notification type."; | 50 "Unexpected notification type."; |
51 if (content::Source<Profile>(source).ptr() == profile_) { | 51 if (content::Source<Profile>(source).ptr() == profile_) { |
52 notification_registrar_.RemoveAll(); | 52 notification_registrar_.RemoveAll(); |
53 pref_change_registrar_.RemoveAll(); | 53 pref_change_registrar_.RemoveAll(); |
54 profile_ = NULL; | 54 profile_ = NULL; |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 void ExternalPolicyLoader::StartLoading() { | 58 void ExternalPolicyLoader::StartLoading() { |
59 const DictionaryValue* forcelist = | 59 const base::DictionaryValue* forcelist = |
60 profile_->GetPrefs()->GetDictionary(prefs::kExtensionInstallForceList); | 60 profile_->GetPrefs()->GetDictionary(prefs::kExtensionInstallForceList); |
61 prefs_.reset(forcelist ? forcelist->DeepCopy() : NULL); | 61 prefs_.reset(forcelist ? forcelist->DeepCopy() : NULL); |
62 LoadFinished(); | 62 LoadFinished(); |
63 } | 63 } |
64 | 64 |
65 } // namespace extensions | 65 } // namespace extensions |
OLD | NEW |