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

Side by Side Diff: sync/internal_api/test/test_user_share.cc

Issue 10795018: [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fiix indent Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "sync/internal_api/public/test/test_user_share.h" 5 #include "sync/internal_api/public/test/test_user_share.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "sync/syncable/directory.h" 8 #include "sync/syncable/directory.h"
9 #include "sync/test/engine/test_directory_setter_upper.h" 9 #include "sync/test/engine/test_directory_setter_upper.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace syncer { 12 namespace syncer {
13 13
14 TestUserShare::TestUserShare() : dir_maker_(new TestDirectorySetterUpper()) {} 14 TestUserShare::TestUserShare() : dir_maker_(new TestDirectorySetterUpper()) {}
15 15
16 TestUserShare::~TestUserShare() { 16 TestUserShare::~TestUserShare() {
17 if (user_share_.get()) 17 if (user_share_.get())
18 ADD_FAILURE() << "Should have called TestUserShare::TearDown()"; 18 ADD_FAILURE() << "Should have called TestUserShare::TearDown()";
19 } 19 }
20 20
21 void TestUserShare::SetUp() { 21 void TestUserShare::SetUp() {
22 user_share_.reset(new syncer::UserShare()); 22 user_share_.reset(new UserShare());
23 dir_maker_->SetUp(); 23 dir_maker_->SetUp();
24 24
25 // The pointer is owned by dir_maker_, we should not be storing it in a 25 // The pointer is owned by dir_maker_, we should not be storing it in a
26 // scoped_ptr. We must be careful to ensure the scoped_ptr never deletes it. 26 // scoped_ptr. We must be careful to ensure the scoped_ptr never deletes it.
27 user_share_->directory.reset(dir_maker_->directory()); 27 user_share_->directory.reset(dir_maker_->directory());
28 } 28 }
29 29
30 void TestUserShare::TearDown() { 30 void TestUserShare::TearDown() {
31 // Ensure the scoped_ptr doesn't delete the memory we don't own. 31 // Ensure the scoped_ptr doesn't delete the memory we don't own.
32 ignore_result(user_share_->directory.release()); 32 ignore_result(user_share_->directory.release());
33 33
34 user_share_.reset(); 34 user_share_.reset();
35 dir_maker_->TearDown(); 35 dir_maker_->TearDown();
36 } 36 }
37 37
38 syncer::UserShare* TestUserShare::user_share() { 38 UserShare* TestUserShare::user_share() {
39 return user_share_.get(); 39 return user_share_.get();
40 } 40 }
41 41
42 } // namespace syncer 42 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/test/test_internal_components_factory.cc ('k') | sync/internal_api/write_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698