Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / sync_file_system / drive_backend / drive_backend_test_util.h
blobd0163812a2d36fa21105b1f9efb103f65d6af0fe
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_TEST_UTIL_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_TEST_UTIL_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/sync_file_system/sync_status_code.h"
10 #include "google_apis/drive/drive_api_error_codes.h"
12 namespace google_apis {
13 class FileResource;
16 namespace sync_file_system {
17 namespace drive_backend {
19 class FileDetails;
20 class FileMetadata;
21 class FileTracker;
22 class MetadataDatabase;
23 class ServiceMetadata;
25 namespace test_util {
27 void ExpectEquivalentDetails(const FileDetails& left, const FileDetails& right);
28 void ExpectEquivalentMetadata(const FileMetadata& left,
29 const FileMetadata& right);
30 void ExpectEquivalentTrackers(const FileTracker& left,
31 const FileTracker& right);
33 scoped_ptr<FileMetadata> CreateFolderMetadata(const std::string& file_id,
34 const std::string& title);
35 scoped_ptr<FileMetadata> CreateFileMetadata(const std::string& file_id,
36 const std::string& title,
37 const std::string& md5);
38 scoped_ptr<FileTracker> CreateTracker(const FileMetadata& metadata,
39 int64 tracker_id,
40 const FileTracker* parent_tracker);
41 scoped_ptr<FileTracker> CreatePlaceholderTracker(
42 const std::string& file_id,
43 int64 tracker_id,
44 const FileTracker* parent_tracker);
46 // The return value type of GetFileResourceKind().
47 enum FileResourceKind {
48 RESOURCE_KIND_FILE,
49 RESOURCE_KIND_FOLDER,
52 // Returns the kind of the given FileResourceKind.
53 FileResourceKind GetFileResourceKind(const google_apis::FileResource& resource);
55 } // namespace test_util
56 } // namespace drive_backend
57 } // namespace sync_file_system
59 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_TEST_UTIL_H_