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

Unified Diff: ipc/ipc_channel_reader_unittest.cc

Issue 1321253011: Remove dependency on //crypto in //ipc, except on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fallback_clean
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/ipc.gyp ('k') | ipc/ipc_nacl.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_reader_unittest.cc
diff --git a/ipc/ipc_channel_reader_unittest.cc b/ipc/ipc_channel_reader_unittest.cc
index cbcd5dc5189cafa9a2410922e9b1216e72ada5bd..2ecc98b1874ba376e0f034a91eea208cfb07cbbc 100644
--- a/ipc/ipc_channel_reader_unittest.cc
+++ b/ipc/ipc_channel_reader_unittest.cc
@@ -6,6 +6,7 @@
#include <set>
+#include "crypto/random.h"
#include "ipc/attachment_broker.h"
#include "ipc/brokerable_attachment.h"
#include "ipc/ipc_channel_reader.h"
@@ -17,9 +18,17 @@ namespace internal {
namespace {
+BrokerableAttachment::AttachmentId GenerateAttachementId() {
+ BrokerableAttachment::AttachmentId result;
+ crypto::RandBytes(result.nonce, BrokerableAttachment::kNonceSize);
+ return result;
+}
+
class MockAttachment : public BrokerableAttachment {
public:
- MockAttachment(int internal_state) : internal_state_(internal_state) {}
+ MockAttachment(int internal_state)
+ : BrokerableAttachment(GenerateAttachementId(), true),
+ internal_state_(internal_state) {}
MockAttachment(BrokerableAttachment::AttachmentId id)
: BrokerableAttachment(id, true), internal_state_(-1) {}
« no previous file with comments | « ipc/ipc.gyp ('k') | ipc/ipc_nacl.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698