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

Side by Side Diff: extensions/browser/content_verifier_io_data.h

Issue 2294653002: Some linked_ptr -> unique_ptr conversion in extensions/browser. (Closed)
Patch Set: address comments Created 4 years, 3 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 | « extensions/browser/blob_holder.cc ('k') | extensions/browser/content_verifier_io_data.cc » ('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 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 EXTENSIONS_BROWSER_CONTENT_VERIFIER_IO_DATA_H_ 5 #ifndef EXTENSIONS_BROWSER_CONTENT_VERIFIER_IO_DATA_H_
6 #define EXTENSIONS_BROWSER_CONTENT_VERIFIER_IO_DATA_H_ 6 #define EXTENSIONS_BROWSER_CONTENT_VERIFIER_IO_DATA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 12
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
16 #include "base/version.h" 15 #include "base/version.h"
17 16
18 namespace extensions { 17 namespace extensions {
19 18
20 // A helper class for keeping track of data for the ContentVerifier that should 19 // A helper class for keeping track of data for the ContentVerifier that should
21 // only be accessed on the IO thread. 20 // only be accessed on the IO thread.
22 class ContentVerifierIOData 21 class ContentVerifierIOData
23 : public base::RefCountedThreadSafe<ContentVerifierIOData> { 22 : public base::RefCountedThreadSafe<ContentVerifierIOData> {
24 public: 23 public:
(...skipping 14 matching lines...) Expand all
39 void Clear(); 38 void Clear();
40 39
41 // This should be called on the IO thread, and the return value should not 40 // This should be called on the IO thread, and the return value should not
42 // be retained or used on other threads. 41 // be retained or used on other threads.
43 const ExtensionData* GetData(const std::string& extension_id); 42 const ExtensionData* GetData(const std::string& extension_id);
44 43
45 protected: 44 protected:
46 friend class base::RefCountedThreadSafe<ContentVerifierIOData>; 45 friend class base::RefCountedThreadSafe<ContentVerifierIOData>;
47 virtual ~ContentVerifierIOData(); 46 virtual ~ContentVerifierIOData();
48 47
49 std::map<std::string, linked_ptr<ExtensionData> > data_map_; 48 std::map<std::string, std::unique_ptr<ExtensionData>> data_map_;
50 }; 49 };
51 50
52 } // namespace extensions 51 } // namespace extensions
53 52
54 #endif // EXTENSIONS_BROWSER_CONTENT_VERIFIER_IO_DATA_H_ 53 #endif // EXTENSIONS_BROWSER_CONTENT_VERIFIER_IO_DATA_H_
OLDNEW
« no previous file with comments | « extensions/browser/blob_holder.cc ('k') | extensions/browser/content_verifier_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698