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

Side by Side Diff: chrome/browser/autofill/validation_rules_storage_factory.h

Issue 1857663002: chrome/browser/autofill: scoped_ptr -> unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_
6 #define CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_ 6 #define CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_
7 7
8 #include <memory>
9
8 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 13
13 namespace i18n { 14 namespace i18n {
14 namespace addressinput { 15 namespace addressinput {
15 class Storage; 16 class Storage;
16 } 17 }
17 } 18 }
18 19
19 class JsonPrefStore; 20 class JsonPrefStore;
20 class PersistentPrefStore; 21 class PersistentPrefStore;
21 22
22 namespace autofill { 23 namespace autofill {
23 24
24 // Creates Storage objects, all of which are backed by a common pref store. 25 // Creates Storage objects, all of which are backed by a common pref store.
25 class ValidationRulesStorageFactory { 26 class ValidationRulesStorageFactory {
26 public: 27 public:
27 static scoped_ptr< ::i18n::addressinput::Storage> CreateStorage(); 28 static std::unique_ptr<::i18n::addressinput::Storage> CreateStorage();
28 29
29 private: 30 private:
30 friend struct base::DefaultLazyInstanceTraits<ValidationRulesStorageFactory>; 31 friend struct base::DefaultLazyInstanceTraits<ValidationRulesStorageFactory>;
31 32
32 ValidationRulesStorageFactory(); 33 ValidationRulesStorageFactory();
33 ~ValidationRulesStorageFactory(); 34 ~ValidationRulesStorageFactory();
34 35
35 scoped_refptr<JsonPrefStore> json_pref_store_; 36 scoped_refptr<JsonPrefStore> json_pref_store_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(ValidationRulesStorageFactory); 38 DISALLOW_COPY_AND_ASSIGN(ValidationRulesStorageFactory);
38 }; 39 };
39 40
40 } // namespace autofill 41 } // namespace autofill
41 42
42 #endif // CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_ 43 #endif // CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/risk_util.cc ('k') | chrome/browser/autofill/validation_rules_storage_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698