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

Side by Side Diff: ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h

Issue 2065793002: Return a unique_ptr from BinaryValue::CreateWithCopiedBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android and CrOS Created 4 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 PPAPI_SHARED_IMPL_PRIVATE_PPB_X509_CERTIFICATE_PRIVATE_IMPL_H_ 5 #ifndef PPAPI_SHARED_IMPL_PRIVATE_PPB_X509_CERTIFICATE_PRIVATE_IMPL_H_
6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_X509_CERTIFICATE_PRIVATE_IMPL_H_ 6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_X509_CERTIFICATE_PRIVATE_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 namespace ppapi { 24 namespace ppapi {
25 25
26 class PPAPI_SHARED_EXPORT PPB_X509Certificate_Fields { 26 class PPAPI_SHARED_EXPORT PPB_X509Certificate_Fields {
27 public: 27 public:
28 PPB_X509Certificate_Fields(); 28 PPB_X509Certificate_Fields();
29 PPB_X509Certificate_Fields(const PPB_X509Certificate_Fields& fields); 29 PPB_X509Certificate_Fields(const PPB_X509Certificate_Fields& fields);
30 30
31 // Takes ownership of |value|. 31 // Takes ownership of |value|.
32 void SetField(PP_X509Certificate_Private_Field field, base::Value* value); 32 void SetField(PP_X509Certificate_Private_Field field,
33 std::unique_ptr<base::Value> value);
33 PP_Var GetFieldAsPPVar(PP_X509Certificate_Private_Field field) const; 34 PP_Var GetFieldAsPPVar(PP_X509Certificate_Private_Field field) const;
34 35
35 private: 36 private:
36 // Friend so ParamTraits can serialize us. 37 // Friend so ParamTraits can serialize us.
37 friend struct IPC::ParamTraits<ppapi::PPB_X509Certificate_Fields>; 38 friend struct IPC::ParamTraits<ppapi::PPB_X509Certificate_Fields>;
38 39
39 base::ListValue values_; 40 base::ListValue values_;
40 }; 41 };
41 42
42 //------------------------------------------------------------------------------ 43 //------------------------------------------------------------------------------
(...skipping 24 matching lines...) Expand all
67 68
68 private: 69 private:
69 std::unique_ptr<PPB_X509Certificate_Fields> fields_; 70 std::unique_ptr<PPB_X509Certificate_Fields> fields_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(PPB_X509Certificate_Private_Shared); 72 DISALLOW_COPY_AND_ASSIGN(PPB_X509Certificate_Private_Shared);
72 }; 73 };
73 74
74 } // namespace ppapi 75 } // namespace ppapi
75 76
76 #endif // PPAPI_SHARED_IMPL_PRIVATE_X509_CERTIFICATE_PRIVATE_IMPL_H_ 77 #endif // PPAPI_SHARED_IMPL_PRIVATE_X509_CERTIFICATE_PRIVATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698