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

Side by Side Diff: chrome/browser/chromeos/login/signed_settings_temp_storage.cc

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/login/signed_settings_temp_storage.h" 5 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/chromeos/login/ownership_service.h" 8 #include "chrome/browser/chromeos/login/ownership_service.h"
9 #include "chrome/browser/chromeos/login/signed_settings_helper.h" 9 #include "chrome/browser/chromeos/login/signed_settings_helper.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
11 #include "chrome/browser/prefs/scoped_user_pref_update.h" 11 #include "chrome/browser/prefs/scoped_user_pref_update.h"
12 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 // static 16 // static
17 void SignedSettingsTempStorage::RegisterPrefs(PrefService* local_state) { 17 void SignedSettingsTempStorage::RegisterPrefs(PrefService* local_state) {
18 local_state->RegisterDictionaryPref(prefs::kSignedSettingsTempStorage); 18 local_state->RegisterDictionaryPref(prefs::kSignedSettingsTempStorage);
19 } 19 }
20 20
21 // static 21 // static
22 bool SignedSettingsTempStorage::Store(const std::string& name, 22 bool SignedSettingsTempStorage::Store(const std::string& name,
23 const std::string& value, 23 const std::string& value,
24 PrefService* local_state) { 24 PrefService* local_state) {
25 if (local_state) { 25 if (local_state) {
26 DictionaryPrefUpdate temp_storage_update( 26 DictionaryPrefUpdate temp_storage_update(
27 local_state, prefs::kSignedSettingsTempStorage); 27 local_state, prefs::kSignedSettingsTempStorage);
28 temp_storage_update->SetWithoutPathExpansion( 28 temp_storage_update->SetWithoutPathExpansion(
29 name, Value::CreateStringValue(value)); 29 name, base::StringValue::New(value));
30 return true; 30 return true;
31 } 31 }
32 return false; 32 return false;
33 } 33 }
34 34
35 // static 35 // static
36 bool SignedSettingsTempStorage::Retrieve(const std::string& name, 36 bool SignedSettingsTempStorage::Retrieve(const std::string& name,
37 std::string* value, 37 std::string* value,
38 PrefService* local_state) { 38 PrefService* local_state) {
39 if (local_state) { 39 if (local_state) {
(...skipping 24 matching lines...) Expand all
64 std::string value; 64 std::string value;
65 temp_storage->GetStringWithoutPathExpansion(*it, &value); 65 temp_storage->GetStringWithoutPathExpansion(*it, &value);
66 SignedSettingsHelper::Get()->StartStorePropertyOp(*it, value, NULL); 66 SignedSettingsHelper::Get()->StartStorePropertyOp(*it, value, NULL);
67 } 67 }
68 local_state->ClearPref(prefs::kSignedSettingsTempStorage); 68 local_state->ClearPref(prefs::kSignedSettingsTempStorage);
69 } 69 }
70 } 70 }
71 } 71 }
72 72
73 } // namespace chromeos 73 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/input_method_event_router.cc ('k') | chrome/browser/chromeos/login/user_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698