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

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

Issue 10147003: [Sync] Move 'syncapi_core' and 'sync_unit_tests' targets to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win update errors Created 8 years, 8 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) 2012 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/browser/sync/test/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 if (user_share_.get())
15 ADD_FAILURE() << "Should have called TestUserShare::TearDown()";
16 }
17
18 void TestUserShare::SetUp() {
19 user_share_.reset(new sync_api::UserShare());
20 dir_maker_.SetUp();
21
22 // The pointer is owned by dir_maker_, we should not be storing it in a
23 // scoped_ptr. We must be careful to ensure the scoped_ptr never deletes it.
24 user_share_->directory.reset(dir_maker_.directory());
25 }
26
27 void TestUserShare::TearDown() {
28 // Ensure the scoped_ptr doesn't delete the memory we don't own.
29 ignore_result(user_share_->directory.release());
30
31 user_share_.reset();
32 dir_maker_.TearDown();
33 }
34
35 sync_api::UserShare* TestUserShare::user_share() {
36 return user_share_.get();
37 }
38
39 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/engine/test_user_share.h ('k') | chrome/browser/sync/test/integration/enable_disable_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698