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

Unified Diff: third_party/mojo/src/mojo/edk/system/core_test_base.h

Issue 1311043003: Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
Index: third_party/mojo/src/mojo/edk/system/core_test_base.h
diff --git a/third_party/mojo/src/mojo/edk/system/core_test_base.h b/third_party/mojo/src/mojo/edk/system/core_test_base.h
index ce3291870878279ae39ee1f8c5ca26ea81e2db8c..e2375cde3d716471b6d53db7fcc2d484cc18538a 100644
--- a/third_party/mojo/src/mojo/edk/system/core_test_base.h
+++ b/third_party/mojo/src/mojo/edk/system/core_test_base.h
@@ -5,8 +5,8 @@
#ifndef MOJO_EDK_SYSTEM_CORE_TEST_BASE_H_
#define MOJO_EDK_SYSTEM_CORE_TEST_BASE_H_
-#include "base/synchronization/lock.h"
#include "mojo/edk/embedder/simple_platform_support.h"
+#include "mojo/edk/system/mutex.h"
#include "mojo/public/c/system/types.h"
#include "mojo/public/cpp/system/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -88,24 +88,24 @@ class CoreTestBase_MockHandleInfo {
void AwakableWasAdded(Awakable*);
private:
- mutable base::Lock lock_; // Protects the following members.
- unsigned ctor_call_count_;
- unsigned dtor_call_count_;
- unsigned close_call_count_;
- unsigned write_message_call_count_;
- unsigned read_message_call_count_;
- unsigned write_data_call_count_;
- unsigned begin_write_data_call_count_;
- unsigned end_write_data_call_count_;
- unsigned read_data_call_count_;
- unsigned begin_read_data_call_count_;
- unsigned end_read_data_call_count_;
- unsigned add_awakable_call_count_;
- unsigned remove_awakable_call_count_;
- unsigned cancel_all_awakables_call_count_;
-
- bool add_awakable_allowed_;
- std::vector<Awakable*> added_awakables_;
+ mutable Mutex mutex_;
+ unsigned ctor_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned dtor_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned close_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned write_message_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned read_message_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned write_data_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned begin_write_data_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned end_write_data_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned read_data_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned begin_read_data_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned end_read_data_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned add_awakable_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned remove_awakable_call_count_ MOJO_GUARDED_BY(mutex_);
+ unsigned cancel_all_awakables_call_count_ MOJO_GUARDED_BY(mutex_);
+
+ bool add_awakable_allowed_ MOJO_GUARDED_BY(mutex_);
+ std::vector<Awakable*> added_awakables_ MOJO_GUARDED_BY(mutex_);
MOJO_DISALLOW_COPY_AND_ASSIGN(CoreTestBase_MockHandleInfo);
};

Powered by Google App Engine
This is Rietveld 408576698