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

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

Issue 538843002: [EasyUnlock] Port Connection class to native code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android test compile failures Created 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PROXIMITY_AUTH_WIRE_MESSAGE_H
6 #define COMPONENTS_PROXIMITY_AUTH_WIRE_MESSAGE_H
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12
13 namespace proximity_auth {
14
15 class WireMessage {
16 public:
17 virtual ~WireMessage();
18
19 // Returns |true| iff the size of |message_bytes| is at least equal to the
20 // message length encoded in the message header. Returns false if the message
21 // header is not available.
22 static bool IsCompleteMessage(const std::string& message_bytes);
23
24 // Returns the deserialized message from |serialized_message|, or NULL if the
25 // message is malformed.
26 static scoped_ptr<WireMessage> Deserialize(
27 const std::string& serialized_message);
28
29 protected:
30 // Visible for tests.
31 WireMessage();
32
33 private:
34 DISALLOW_COPY_AND_ASSIGN(WireMessage);
35 };
36
37 } // namespace proximity_auth
38
39 #endif // COMPONENTS_PROXIMITY_AUTH_WIRE_MESSAGE_H
OLDNEW
« no previous file with comments | « components/proximity_auth/connection_unittest.cc ('k') | components/proximity_auth/wire_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698