Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6976)

Unified Diff: chrome/browser/ui/webui/options/chromeos/system_settings_provider.cc

Issue 7867044: PART1: Initiated the SignedSettings refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the comments from Denis. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/chromeos/system_settings_provider.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/system_settings_provider.cc b/chrome/browser/ui/webui/options/chromeos/system_settings_provider.cc
index bc7a963050225d43ded12c299def50fc77a05cd8..6478af74c96084f75539d7f370dc71b0ef1374ed 100644
--- a/chrome/browser/ui/webui/options/chromeos/system_settings_provider.cc
+++ b/chrome/browser/ui/webui/options/chromeos/system_settings_provider.cc
@@ -211,14 +211,20 @@ void SystemSettingsProvider::DoSet(const std::string& path, Value* in_value) {
}
}
-bool SystemSettingsProvider::Get(const std::string& path,
- Value** out_value) const {
+const base::Value* SystemSettingsProvider::Get(const std::string& path) const {
if (path == kSystemTimezone) {
- *out_value = Value::CreateStringValue(GetKnownTimezoneID(
+ // TODO(pastarmovj): This will leak now if the callee doesn't delete it.
Mattias Nissler (ping if slow) 2011/09/21 11:12:59 Isn't passing ownership to the caller the contract
pastarmovj 2011/09/23 15:19:32 This misunderstanding comes again because of the w
+ // We should anyhow cache this in the local_state.
Mattias Nissler (ping if slow) 2011/09/21 11:12:59 If we're caching for all providers, should we move
pastarmovj 2011/09/23 15:19:32 Sounds like a nice idea but it might make ownershi
+ return Value::CreateStringValue(GetKnownTimezoneID(
system::TimezoneSettings::GetInstance()->GetTimezone()));
- return true;
}
- return false;
+ return NULL;
+}
+
+// The timezone is always trusted.
+bool SystemSettingsProvider::GetTrusted(const std::string& path,
+ const Callback& callback) const {
+ return true;
}
bool SystemSettingsProvider::HandlesSetting(const std::string& path) const {

Powered by Google App Engine
This is Rietveld 408576698