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

Side by Side Diff: chrome/browser/supervised_user/experimental/supervised_user_blacklist.h

Issue 1878143002: Convert //chrome/browser/supervised_user from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_SUPERVISED_USER_EXPERIMENTAL_SUPERVISED_USER_BLACKLIST_H_ 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_EXPERIMENTAL_SUPERVISED_USER_BLACKLIST_H_
6 #define CHROME_BROWSER_SUPERVISED_USER_EXPERIMENTAL_SUPERVISED_USER_BLACKLIST_H_ 6 #define CHROME_BROWSER_SUPERVISED_USER_EXPERIMENTAL_SUPERVISED_USER_BLACKLIST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/callback_forward.h" 14 #include "base/callback_forward.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/sha1.h" 17 #include "base/sha1.h"
18 18
19 namespace base { 19 namespace base {
20 class FilePath; 20 class FilePath;
21 } 21 }
22 22
23 class GURL; 23 class GURL;
24 24
25 // Compact list of (SHA1 hashes of) blocked hosts. 25 // Compact list of (SHA1 hashes of) blocked hosts.
(...skipping 16 matching lines...) Expand all
42 // or not), but not if the SupervisedUserBlacklist is destroyed before that. 42 // or not), but not if the SupervisedUserBlacklist is destroyed before that.
43 void ReadFromFile(const base::FilePath& path, 43 void ReadFromFile(const base::FilePath& path,
44 const base::Closure& done_callback); 44 const base::Closure& done_callback);
45 45
46 bool HasURL(const GURL& url) const; 46 bool HasURL(const GURL& url) const;
47 47
48 size_t GetEntryCount() const; 48 size_t GetEntryCount() const;
49 49
50 private: 50 private:
51 void OnReadFromFileCompleted(const base::Closure& done_callback, 51 void OnReadFromFileCompleted(const base::Closure& done_callback,
52 scoped_ptr<std::vector<Hash> > host_hashes); 52 std::unique_ptr<std::vector<Hash>> host_hashes);
53 53
54 std::vector<Hash> host_hashes_; 54 std::vector<Hash> host_hashes_;
55 55
56 base::WeakPtrFactory<SupervisedUserBlacklist> weak_ptr_factory_; 56 base::WeakPtrFactory<SupervisedUserBlacklist> weak_ptr_factory_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(SupervisedUserBlacklist); 58 DISALLOW_COPY_AND_ASSIGN(SupervisedUserBlacklist);
59 }; 59 };
60 60
61 #endif // CHROME_BROWSER_SUPERVISED_USER_EXPERIMENTAL_SUPERVISED_USER_BLACKLIST _H_ 61 #endif // CHROME_BROWSER_SUPERVISED_USER_EXPERIMENTAL_SUPERVISED_USER_BLACKLIST _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698