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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_impl_unittest.cc

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/glue/sync_backend_host_impl.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 fake_manager_->GetAndResetConfigureReason()); 684 fake_manager_->GetAndResetConfigureReason());
685 } 685 }
686 686
687 // It is SyncBackendHostCore responsibility to cleanup Sync Data folder if sync 687 // It is SyncBackendHostCore responsibility to cleanup Sync Data folder if sync
688 // setup hasn't been completed. This test ensures that cleanup happens. 688 // setup hasn't been completed. This test ensures that cleanup happens.
689 TEST_F(SyncBackendHostTest, TestStartupWithOldSyncData) { 689 TEST_F(SyncBackendHostTest, TestStartupWithOldSyncData) {
690 const char* nonsense = "slon"; 690 const char* nonsense = "slon";
691 base::FilePath temp_directory = 691 base::FilePath temp_directory =
692 profile_->GetPath().AppendASCII("Sync Data"); 692 profile_->GetPath().AppendASCII("Sync Data");
693 base::FilePath sync_file = temp_directory.AppendASCII("SyncData.sqlite3"); 693 base::FilePath sync_file = temp_directory.AppendASCII("SyncData.sqlite3");
694 ASSERT_TRUE(file_util::CreateDirectory(temp_directory)); 694 ASSERT_TRUE(base::CreateDirectory(temp_directory));
695 ASSERT_NE(-1, file_util::WriteFile(sync_file, nonsense, strlen(nonsense))); 695 ASSERT_NE(-1, file_util::WriteFile(sync_file, nonsense, strlen(nonsense)));
696 696
697 InitializeBackend(true); 697 InitializeBackend(true);
698 698
699 EXPECT_FALSE(base::PathExists(sync_file)); 699 EXPECT_FALSE(base::PathExists(sync_file));
700 } 700 }
701 701
702 } // namespace 702 } // namespace
703 703
704 } // namespace browser_sync 704 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_core.cc ('k') | chrome/browser/sync/test/integration/sync_extension_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698