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

Side by Side Diff: components/proximity_auth/messenger_impl.h

Issue 1375633004: Encrypting messages send/received from BLE devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_test_tim
Patch Set: Using old protocol for BLE devices Created 5 years, 2 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 | « no previous file | components/proximity_auth/messenger_impl.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 COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H
6 #define COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H 6 #define COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 protected: 48 protected:
49 SecureContext* secure_context() { return secure_context_.get(); } 49 SecureContext* secure_context() { return secure_context_.get(); }
50 50
51 private: 51 private:
52 // Internal data structure to represent a pending message that either hasn't 52 // Internal data structure to represent a pending message that either hasn't
53 // been sent yet or is waiting for a response from the remote device. 53 // been sent yet or is waiting for a response from the remote device.
54 struct PendingMessage { 54 struct PendingMessage {
55 PendingMessage(); 55 PendingMessage();
56 PendingMessage(const base::DictionaryValue& message); 56 PendingMessage(const base::DictionaryValue& message);
57 PendingMessage(const std::string& message);
57 ~PendingMessage(); 58 ~PendingMessage();
58 59
59 // The message, serialized as JSON. 60 // The message, serialized as JSON.
60 const std::string json_message; 61 const std::string json_message;
61 62
62 // The message type. This is possible to parse from the |json_message|; it's 63 // The message type. This is possible to parse from the |json_message|; it's
63 // stored redundantly for convenience. 64 // stored redundantly for convenience.
64 const std::string type; 65 const std::string type;
65 }; 66 };
66 67
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 scoped_ptr<PendingMessage> pending_message_; 118 scoped_ptr<PendingMessage> pending_message_;
118 119
119 base::WeakPtrFactory<MessengerImpl> weak_ptr_factory_; 120 base::WeakPtrFactory<MessengerImpl> weak_ptr_factory_;
120 121
121 DISALLOW_COPY_AND_ASSIGN(MessengerImpl); 122 DISALLOW_COPY_AND_ASSIGN(MessengerImpl);
122 }; 123 };
123 124
124 } // namespace proximity_auth 125 } // namespace proximity_auth
125 126
126 #endif // COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H 127 #endif // COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H
OLDNEW
« no previous file with comments | « no previous file | components/proximity_auth/messenger_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698