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

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

Issue 2094333002: Implementation for chrome.certificateProvider.requestPin/stopPinRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review 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
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_SIGN_REQUESTS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_SIGN_REQUESTS_H_
6 #define CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_SIGN_REQUESTS_H_ 6 #define CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_SIGN_REQUESTS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 29 matching lines...) Expand all
40 private: 40 private:
41 // Holds state of all sign requests to a single extension. 41 // Holds state of all sign requests to a single extension.
42 struct RequestsState { 42 struct RequestsState {
43 RequestsState(); 43 RequestsState();
44 RequestsState(const RequestsState& other); 44 RequestsState(const RequestsState& other);
45 ~RequestsState(); 45 ~RequestsState();
46 46
47 // Maps from request id to the SignCallback that must be called with the 47 // Maps from request id to the SignCallback that must be called with the
48 // signature or error. 48 // signature or error.
49 std::map<int, net::SSLPrivateKey::SignCallback> pending_requests; 49 std::map<int, net::SSLPrivateKey::SignCallback> pending_requests;
50
51 // The request id that will be used for the next sign request to this
52 // extension.
53 int next_free_id = 0;
54 }; 50 };
55 51
56 // Contains the state of all sign requests per extension. 52 // Contains the state of all sign requests per extension.
57 std::map<std::string, RequestsState> extension_to_requests_; 53 std::map<std::string, RequestsState> extension_to_requests_;
58 54
59 DISALLOW_COPY_AND_ASSIGN(SignRequests); 55 DISALLOW_COPY_AND_ASSIGN(SignRequests);
60 }; 56 };
61 57
62 } // namespace certificate_provider 58 } // namespace certificate_provider
63 } // namespace chromeos 59 } // namespace chromeos
64 60
65 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_SIGN_REQUESTS_H_ 61 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_SIGN_REQUESTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698