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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc

Issue 322813002: [SyncFS] Drop test only un-thread-safe getters from SyncEngine (4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: buildfix Created 6 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/sync_engine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <algorithm> 5 #include <algorithm>
6 #include <stack> 6 #include <stack>
7 7
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 base::Bind(&MetadataDatabase::CountFileTracker, 554 base::Bind(&MetadataDatabase::CountFileTracker,
555 base::Unretained(metadata_database())), 555 base::Unretained(metadata_database())),
556 base::Bind(&SetValueAndCallClosure<size_t>, 556 base::Bind(&SetValueAndCallClosure<size_t>,
557 run_loop.QuitClosure(), &count)); 557 run_loop.QuitClosure(), &count));
558 run_loop.Run(); 558 run_loop.Run();
559 return count; 559 return count;
560 } 560 }
561 561
562 drive::FakeDriveService* fake_drive_service() { 562 drive::FakeDriveService* fake_drive_service() {
563 return static_cast<drive::FakeDriveService*>( 563 return static_cast<drive::FakeDriveService*>(
564 remote_sync_service_->GetDriveService()); 564 remote_sync_service_->drive_service_.get());
565 } 565 }
566 566
567 FakeDriveServiceHelper* fake_drive_service_helper() { 567 FakeDriveServiceHelper* fake_drive_service_helper() {
568 return fake_drive_service_helper_.get(); 568 return fake_drive_service_helper_.get();
569 } 569 }
570 570
571 private: 571 private:
572 // MetadataDatabase is normally used on the worker thread. 572 // MetadataDatabase is normally used on the worker thread.
573 // Use this only when there is no task running on the worker. 573 // Use this only when there is no task running on the worker.
574 MetadataDatabase* metadata_database() { 574 MetadataDatabase* metadata_database() {
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 1678
1679 EXPECT_EQ(1u, CountApp()); 1679 EXPECT_EQ(1u, CountApp());
1680 EXPECT_EQ(1u, CountLocalFile(app_id)); 1680 EXPECT_EQ(1u, CountLocalFile(app_id));
1681 1681
1682 EXPECT_EQ(2u, CountMetadata()); 1682 EXPECT_EQ(2u, CountMetadata());
1683 EXPECT_EQ(2u, CountTracker()); 1683 EXPECT_EQ(2u, CountTracker());
1684 } 1684 }
1685 1685
1686 } // namespace drive_backend 1686 } // namespace drive_backend
1687 } // namespace sync_file_system 1687 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/sync_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698