| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 5 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/sync/test/integration/sync_test.h" | 7 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| 11 // The SyncTest instance associated with sync_datatype_helper. | 11 // The SyncTest instance associated with sync_datatype_helper. |
| 12 static SyncTest* test = NULL; | 12 static SyncTest* test = nullptr; |
| 13 | 13 |
| 14 } // namespace | 14 } // namespace |
| 15 | 15 |
| 16 namespace sync_datatype_helper { | 16 namespace sync_datatype_helper { |
| 17 | 17 |
| 18 void AssociateWithTest(SyncTest* test) { | 18 void AssociateWithTest(SyncTest* test) { |
| 19 ASSERT_TRUE(test != NULL) << "Cannot associate with null test."; | 19 ASSERT_TRUE(test != nullptr) << "Cannot associate with null test."; |
| 20 ASSERT_TRUE(::test == NULL) << "Already associated with a test."; | 20 ASSERT_TRUE(::test == nullptr) << "Already associated with a test."; |
| 21 ::test = test; | 21 ::test = test; |
| 22 } | 22 } |
| 23 | 23 |
| 24 SyncTest* test() { | 24 SyncTest* test() { |
| 25 EXPECT_TRUE(::test != NULL) << "Must call AssociateWithTest first."; | 25 EXPECT_TRUE(::test != nullptr) << "Must call AssociateWithTest first."; |
| 26 return ::test; | 26 return ::test; |
| 27 } | 27 } |
| 28 | 28 |
| 29 } // namespace sync_datatype_helper | 29 } // namespace sync_datatype_helper |
| OLD | NEW |