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

Side by Side Diff: chrome/test/sync/engine/test_user_share.cc

Issue 7828055: Move sync test code out of chrome/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/test/sync/engine/test_user_share.h"
6
7 #include "base/compiler_specific.h"
8
9 namespace browser_sync {
10
11 TestUserShare::TestUserShare() {}
12
13 TestUserShare::~TestUserShare() {
14 CHECK(!user_share_.dir_manager.get());
15 }
16
17 void TestUserShare::SetUp() {
18 setter_upper_.SetUp();
19 // HACK: We have two scoped_ptrs to the same object. But we make
20 // sure to release one in TearDown.
21 user_share_.dir_manager.reset(setter_upper_.manager());
22 user_share_.name = setter_upper_.name();
23 }
24
25 void TestUserShare::TearDown() {
26 // Make sure we don't free the manager twice.
27 ignore_result(user_share_.dir_manager.release());
28 setter_upper_.TearDown();
29 }
30
31 sync_api::UserShare* TestUserShare::user_share() {
32 return &user_share_;
33 }
34
35 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/test/sync/engine/test_user_share.h ('k') | chrome/test/sync/null_directory_change_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698