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

Side by Side Diff: chrome/browser/sync_file_system/drive_file_sync_service.h

Issue 12391012: Sync FileSystem: Add simulated relaunch of DriveFileSyncService on its unit_tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unused comparator Created 7 years, 9 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_file_sync_service.cc » ('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 (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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 virtual ~DriveFileSyncService(); 55 virtual ~DriveFileSyncService();
56 56
57 // Creates DriveFileSyncClient instance for testing. 57 // Creates DriveFileSyncClient instance for testing.
58 // |metadata_store| must be initialized beforehand. 58 // |metadata_store| must be initialized beforehand.
59 static scoped_ptr<DriveFileSyncService> CreateForTesting( 59 static scoped_ptr<DriveFileSyncService> CreateForTesting(
60 Profile* profile, 60 Profile* profile,
61 const base::FilePath& base_dir, 61 const base::FilePath& base_dir,
62 scoped_ptr<DriveFileSyncClientInterface> sync_client, 62 scoped_ptr<DriveFileSyncClientInterface> sync_client,
63 scoped_ptr<DriveMetadataStore> metadata_store); 63 scoped_ptr<DriveMetadataStore> metadata_store);
64 64
65 // Destroy |sync_service| and pass the ownership of |sync_client| to caller
nhiroki 2013/03/01 03:25:21 nit: Destroy->Destroys, pass->passes
tzik 2013/03/01 03:43:01 Done.
66 // for testing.
67 static scoped_ptr<DriveFileSyncClientInterface>
68 DestroyAndPassSyncClientForTesting(
69 scoped_ptr<DriveFileSyncService> sync_service);
70
65 // RemoteFileSyncService overrides. 71 // RemoteFileSyncService overrides.
66 virtual void AddServiceObserver(Observer* observer) OVERRIDE; 72 virtual void AddServiceObserver(Observer* observer) OVERRIDE;
67 virtual void AddFileStatusObserver(FileStatusObserver* observer) OVERRIDE; 73 virtual void AddFileStatusObserver(FileStatusObserver* observer) OVERRIDE;
68 virtual void RegisterOriginForTrackingChanges( 74 virtual void RegisterOriginForTrackingChanges(
69 const GURL& origin, 75 const GURL& origin,
70 const SyncStatusCallback& callback) OVERRIDE; 76 const SyncStatusCallback& callback) OVERRIDE;
71 virtual void UnregisterOriginForTrackingChanges( 77 virtual void UnregisterOriginForTrackingChanges(
72 const GURL& origin, 78 const GURL& origin,
73 const SyncStatusCallback& callback) OVERRIDE; 79 const SyncStatusCallback& callback) OVERRIDE;
74 virtual void ProcessRemoteChange( 80 virtual void ProcessRemoteChange(
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // Use WeakPtrFactory instead of SupportsWeakPtr to revoke the weak pointer 441 // Use WeakPtrFactory instead of SupportsWeakPtr to revoke the weak pointer
436 // in |token_|. 442 // in |token_|.
437 base::WeakPtrFactory<DriveFileSyncService> weak_factory_; 443 base::WeakPtrFactory<DriveFileSyncService> weak_factory_;
438 444
439 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncService); 445 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncService);
440 }; 446 };
441 447
442 } // namespace sync_file_system 448 } // namespace sync_file_system
443 449
444 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_ 450 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_file_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698