| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/api/settings_private/settings_private_delega
te.h" | 5 #include "chrome/browser/extensions/api/settings_private/settings_private_delega
te.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chromeos/settings/cros_settings.h" | 10 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 const TypedPrefMap& keys = prefs_util_->GetWhitelistedKeys(); | 42 const TypedPrefMap& keys = prefs_util_->GetWhitelistedKeys(); |
| 43 for (const auto& it : keys) { | 43 for (const auto& it : keys) { |
| 44 scoped_ptr<base::Value> pref = GetPref(it.first); | 44 scoped_ptr<base::Value> pref = GetPref(it.first); |
| 45 if (!pref->IsType(base::Value::TYPE_NULL)) | 45 if (!pref->IsType(base::Value::TYPE_NULL)) |
| 46 prefs->Append(pref.release()); | 46 prefs->Append(pref.release()); |
| 47 } | 47 } |
| 48 | 48 |
| 49 return prefs.Pass(); | 49 return prefs.Pass(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool SettingsPrivateDelegate::SetPref(const std::string& pref_name, | 52 PrefsUtil::SetPrefResult SettingsPrivateDelegate::SetPref( |
| 53 const base::Value* value) { | 53 const std::string& pref_name, const base::Value* value) { |
| 54 return prefs_util_->SetPref(pref_name, value); | 54 return prefs_util_->SetPref(pref_name, value); |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace extensions | 57 } // namespace extensions |
| OLD | NEW |