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

Side by Side Diff: chrome/browser/chromeos/certificate_provider/certificate_requests.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iwyu fixes 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 CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_REQUESTS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_REQUESTS_H_
6 #define CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_REQUESTS_H_ 6 #define CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_REQUESTS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
13 #include "base/macros.h" 14 #include "base/macros.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "chrome/browser/chromeos/certificate_provider/certificate_info.h" 15 #include "chrome/browser/chromeos/certificate_provider/certificate_info.h"
16 #include "net/cert/x509_certificate.h" 16 #include "net/cert/x509_certificate.h"
17 17
18 namespace chromeos { 18 namespace chromeos {
19 namespace certificate_provider { 19 namespace certificate_provider {
20 20
21 class CertificateRequests { 21 class CertificateRequests {
22 public: 22 public:
23 CertificateRequests(); 23 CertificateRequests();
24 ~CertificateRequests(); 24 ~CertificateRequests();
(...skipping 24 matching lines...) Expand all
49 std::map<std::string, CertificateInfoList>* certificates, 49 std::map<std::string, CertificateInfoList>* certificates,
50 base::Callback<void(const net::CertificateList&)>* callback); 50 base::Callback<void(const net::CertificateList&)>* callback);
51 51
52 // Removes this extension from all pending requests and returns the ids of 52 // Removes this extension from all pending requests and returns the ids of
53 // all completed requests. 53 // all completed requests.
54 std::vector<int> DropExtension(const std::string& extension_id); 54 std::vector<int> DropExtension(const std::string& extension_id);
55 55
56 private: 56 private:
57 struct CertificateRequestState; 57 struct CertificateRequestState;
58 58
59 std::map<int, scoped_ptr<CertificateRequestState>> requests_; 59 std::map<int, std::unique_ptr<CertificateRequestState>> requests_;
60 int next_free_request_id_ = 0; 60 int next_free_request_id_ = 0;
61 61
62 DISALLOW_COPY_AND_ASSIGN(CertificateRequests); 62 DISALLOW_COPY_AND_ASSIGN(CertificateRequests);
63 }; 63 };
64 64
65 } // namespace certificate_provider 65 } // namespace certificate_provider
66 } // namespace chromeos 66 } // namespace chromeos
67 67
68 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_REQUESTS_H_ 68 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_REQUESTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698