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

Side by Side Diff: chrome/browser/extensions/blacklist_state_fetcher.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EXTENSIONS_BLACKLIST_STATE_FETCHER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_BLACKLIST_STATE_FETCHER_H_
6 #define CHROME_BROWSER_EXTENSIONS_BLACKLIST_STATE_FETCHER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_BLACKLIST_STATE_FETCHER_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 #include <string> 10 #include <string>
10 11
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "chrome/browser/safe_browsing/protocol_manager_helper.h" 15 #include "chrome/browser/safe_browsing/protocol_manager_helper.h"
16 #include "extensions/browser/blacklist_state.h" 16 #include "extensions/browser/blacklist_state.h"
17 #include "net/url_request/url_fetcher.h" 17 #include "net/url_request/url_fetcher.h"
18 #include "net/url_request/url_fetcher_delegate.h" 18 #include "net/url_request/url_fetcher_delegate.h"
19 19
20 namespace net { 20 namespace net {
21 class URLRequestContextGetter; 21 class URLRequestContextGetter;
22 } 22 }
23 23
(...skipping 22 matching lines...) Expand all
46 private: 46 private:
47 typedef std::multimap<std::string, RequestCallback> CallbackMultiMap; 47 typedef std::multimap<std::string, RequestCallback> CallbackMultiMap;
48 48
49 GURL RequestUrl() const; 49 GURL RequestUrl() const;
50 50
51 void SendRequest(const std::string& id); 51 void SendRequest(const std::string& id);
52 52
53 // ID for URLFetchers for testing. 53 // ID for URLFetchers for testing.
54 int url_fetcher_id_; 54 int url_fetcher_id_;
55 55
56 scoped_ptr<safe_browsing::SafeBrowsingProtocolConfig> safe_browsing_config_; 56 std::unique_ptr<safe_browsing::SafeBrowsingProtocolConfig>
57 safe_browsing_config_;
57 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 58 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
58 scoped_refptr<net::URLRequestContextGetter> parent_request_context_for_test_; 59 scoped_refptr<net::URLRequestContextGetter> parent_request_context_for_test_;
59 60
60 // Extension id by URLFetcher. 61 // Extension id by URLFetcher.
61 std::map<const net::URLFetcher*, std::string> requests_; 62 std::map<const net::URLFetcher*, std::string> requests_;
62 63
63 // Callbacks by extension ID. 64 // Callbacks by extension ID.
64 CallbackMultiMap callbacks_; 65 CallbackMultiMap callbacks_;
65 66
66 base::WeakPtrFactory<BlacklistStateFetcher> weak_ptr_factory_; 67 base::WeakPtrFactory<BlacklistStateFetcher> weak_ptr_factory_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(BlacklistStateFetcher); 69 DISALLOW_COPY_AND_ASSIGN(BlacklistStateFetcher);
69 }; 70 };
70 71
71 } // namespace extensions 72 } // namespace extensions
72 73
73 #endif // CHROME_BROWSER_EXTENSIONS_BLACKLIST_STATE_FETCHER_H_ 74 #endif // CHROME_BROWSER_EXTENSIONS_BLACKLIST_STATE_FETCHER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/blacklist.h ('k') | chrome/browser/extensions/blacklist_state_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698