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

Unified Diff: ppapi/shared_impl/proxy_lock_unittest.cc

Issue 174213003: PPAPI: Use clang-format on ppapi/shared_impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove DEPS Created 6 years, 10 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 | « ppapi/shared_impl/proxy_lock.cc ('k') | ppapi/shared_impl/resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/proxy_lock_unittest.cc
diff --git a/ppapi/shared_impl/proxy_lock_unittest.cc b/ppapi/shared_impl/proxy_lock_unittest.cc
index f0751493ace848dd8db8fbe30a31e55fb87f51e4..c533b5ba989b0cd9cc4ede5e9ad3becf674b5d54 100644
--- a/ppapi/shared_impl/proxy_lock_unittest.cc
+++ b/ppapi/shared_impl/proxy_lock_unittest.cc
@@ -34,14 +34,11 @@ class CheckLockStateInDestructor
: public base::RefCounted<CheckLockStateInDestructor> {
public:
CheckLockStateInDestructor() {}
- void Method() {
- ++called_num;
- }
+ void Method() { ++called_num; }
+
private:
friend class base::RefCounted<CheckLockStateInDestructor>;
- ~CheckLockStateInDestructor() {
- CheckLockState();
- }
+ ~CheckLockStateInDestructor() { CheckLockState(); }
DISALLOW_COPY_AND_ASSIGN(CheckLockStateInDestructor);
};
@@ -93,9 +90,8 @@ TEST(PpapiProxyLockTest, Locking) {
ProxyAutoLock lock;
scoped_refptr<CheckLockStateInDestructor> object =
new CheckLockStateInDestructor();
- cb0 = RunWhileLocked(
- base::Bind(&CheckLockStateInDestructor::Method,
- object));
+ cb0 =
+ RunWhileLocked(base::Bind(&CheckLockStateInDestructor::Method, object));
// Note after this scope, the Callback owns the only reference.
}
cb0.Run();
@@ -158,18 +154,21 @@ TEST(PpapiProxyLockTest, Unlocking) {
CallWhileUnlocked(TestCallback_0);
ASSERT_EQ(1, called_num);
called_num = 0;
- } {
+ }
+ {
CallWhileUnlocked(TestCallback_1, 123);
ASSERT_EQ(1, called_num);
called_num = 0;
- } {
+ }
+ {
// TODO(dmichael): Make const-ref arguments work properly with type
// deduction.
CallWhileUnlocked<void, int, const std::string&>(
TestCallback_2, 123, std::string("yo"));
ASSERT_EQ(1, called_num);
called_num = 0;
- } {
+ }
+ {
base::Callback<void()> callback(base::Bind(TestCallback_0));
CallWhileUnlocked(callback);
ASSERT_EQ(1, called_num);
« no previous file with comments | « ppapi/shared_impl/proxy_lock.cc ('k') | ppapi/shared_impl/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698