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

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

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add header 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
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 #ifndef IOS_CRNET_SDCH_OWNER_PREF_STORAGE_H_ 5 #ifndef IOS_CRNET_SDCH_OWNER_PREF_STORAGE_H_
6 #define IOS_CRNET_SDCH_OWNER_PREF_STORAGE_H_ 6 #define IOS_CRNET_SDCH_OWNER_PREF_STORAGE_H_
7 7
noyau (Ping after 24h) 2016/04/07 13:34:05 #include <memory>
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/prefs/pref_store.h" 9 #include "components/prefs/pref_store.h"
10 #include "net/sdch/sdch_owner.h" 10 #include "net/sdch/sdch_owner.h"
11 11
12 class PersistentPrefStore; 12 class PersistentPrefStore;
13 13
14 // Provides an implementation of SdchOwner::PrefStorage that maps to 14 // Provides an implementation of SdchOwner::PrefStorage that maps to
15 // Chrome's preferences system. 15 // Chrome's preferences system.
16 class SdchOwnerPrefStorage 16 class SdchOwnerPrefStorage
17 : public net::SdchOwner::PrefStorage, 17 : public net::SdchOwner::PrefStorage,
18 public PrefStore::Observer { 18 public PrefStore::Observer {
19 public: 19 public:
20 // The storage must outlive this class. 20 // The storage must outlive this class.
21 explicit SdchOwnerPrefStorage(PersistentPrefStore* storage); 21 explicit SdchOwnerPrefStorage(PersistentPrefStore* storage);
22 ~SdchOwnerPrefStorage() override; 22 ~SdchOwnerPrefStorage() override;
23 23
24 ReadError GetReadError() const override; 24 ReadError GetReadError() const override;
25 bool GetValue(const base::DictionaryValue** result) const override; 25 bool GetValue(const base::DictionaryValue** result) const override;
26 bool GetMutableValue(base::DictionaryValue** result) override; 26 bool GetMutableValue(base::DictionaryValue** result) override;
27 void SetValue(scoped_ptr<base::DictionaryValue> value) override; 27 void SetValue(std::unique_ptr<base::DictionaryValue> value) override;
28 void ReportValueChanged() override; 28 void ReportValueChanged() override;
29 bool IsInitializationComplete() override; 29 bool IsInitializationComplete() override;
30 void StartObservingInit(net::SdchOwner* observer) override; 30 void StartObservingInit(net::SdchOwner* observer) override;
31 void StopObservingInit() override; 31 void StopObservingInit() override;
32 32
33 private: 33 private:
34 // PrefStore::Observer implementation. 34 // PrefStore::Observer implementation.
35 void OnPrefValueChanged(const std::string& key) override; 35 void OnPrefValueChanged(const std::string& key) override;
36 void OnInitializationCompleted(bool succeeded) override; 36 void OnInitializationCompleted(bool succeeded) override;
37 37
38 PersistentPrefStore* storage_; // Non-owning. 38 PersistentPrefStore* storage_; // Non-owning.
39 const std::string storage_key_; 39 const std::string storage_key_;
40 40
41 net::SdchOwner* init_observer_; // Non-owning. 41 net::SdchOwner* init_observer_; // Non-owning.
42 42
43 DISALLOW_COPY_AND_ASSIGN(SdchOwnerPrefStorage); 43 DISALLOW_COPY_AND_ASSIGN(SdchOwnerPrefStorage);
44 }; 44 };
45 45
46 #endif // IOS_CRNET_SDCH_OWNER_PREF_STORAGE_H_ 46 #endif // IOS_CRNET_SDCH_OWNER_PREF_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698