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

Side by Side Diff: ios/crnet/sdch_owner_pref_storage.cc

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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
« no previous file with comments | « ios/crnet/sdch_owner_pref_storage.h ('k') | ios/net/clients/crn_network_client_protocol.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ios/crnet/sdch_owner_pref_storage.h" 5 #include "ios/crnet/sdch_owner_pref_storage.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "components/prefs/persistent_pref_store.h" 8 #include "components/prefs/persistent_pref_store.h"
9 9
10 namespace { 10 namespace {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return result_value->GetAsDictionary(result); 65 return result_value->GetAsDictionary(result);
66 } 66 }
67 67
68 bool SdchOwnerPrefStorage::GetMutableValue(base::DictionaryValue** result) { 68 bool SdchOwnerPrefStorage::GetMutableValue(base::DictionaryValue** result) {
69 base::Value* result_value = nullptr; 69 base::Value* result_value = nullptr;
70 if (!storage_->GetMutableValue(storage_key_, &result_value)) 70 if (!storage_->GetMutableValue(storage_key_, &result_value))
71 return false; 71 return false;
72 return result_value->GetAsDictionary(result); 72 return result_value->GetAsDictionary(result);
73 } 73 }
74 74
75 void SdchOwnerPrefStorage::SetValue(scoped_ptr<base::DictionaryValue> value) { 75 void SdchOwnerPrefStorage::SetValue(
76 std::unique_ptr<base::DictionaryValue> value) {
76 storage_->SetValue(storage_key_, std::move(value), 77 storage_->SetValue(storage_key_, std::move(value),
77 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 78 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
78 } 79 }
79 80
80 void SdchOwnerPrefStorage::ReportValueChanged() { 81 void SdchOwnerPrefStorage::ReportValueChanged() {
81 storage_->ReportValueChanged(storage_key_, 82 storage_->ReportValueChanged(storage_key_,
82 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 83 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
83 } 84 }
84 85
85 bool SdchOwnerPrefStorage::IsInitializationComplete() { 86 bool SdchOwnerPrefStorage::IsInitializationComplete() {
(...skipping 12 matching lines...) Expand all
98 storage_->RemoveObserver(this); 99 storage_->RemoveObserver(this);
99 } 100 }
100 101
101 void SdchOwnerPrefStorage::OnPrefValueChanged(const std::string& key) { 102 void SdchOwnerPrefStorage::OnPrefValueChanged(const std::string& key) {
102 } 103 }
103 104
104 void SdchOwnerPrefStorage::OnInitializationCompleted(bool succeeded) { 105 void SdchOwnerPrefStorage::OnInitializationCompleted(bool succeeded) {
105 DCHECK(init_observer_); 106 DCHECK(init_observer_);
106 init_observer_->OnPrefStorageInitializationComplete(succeeded); 107 init_observer_->OnPrefStorageInitializationComplete(succeeded);
107 } 108 }
OLDNEW
« no previous file with comments | « ios/crnet/sdch_owner_pref_storage.h ('k') | ios/net/clients/crn_network_client_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698