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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/sync_task_token.h

Issue 302003013: [SyncFS] Run V2 backend tasks as SyncTask (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void set_blocking_factor(scoped_ptr<BlockingFactor> blocking_factor); 51 void set_blocking_factor(scoped_ptr<BlockingFactor> blocking_factor);
52 const BlockingFactor* blocking_factor() const; 52 const BlockingFactor* blocking_factor() const;
53 void clear_blocking_factor(); 53 void clear_blocking_factor();
54 54
55 int64 token_id() const { return token_id_; } 55 int64 token_id() const { return token_id_; }
56 56
57 void InitializeTaskLog(const std::string& task_description); 57 void InitializeTaskLog(const std::string& task_description);
58 void FinalizeTaskLog(const std::string& result_description); 58 void FinalizeTaskLog(const std::string& result_description);
59 void RecordLog(const std::string& message); 59 void RecordLog(const std::string& message);
60 60
61 bool has_task_log() const { return task_log_; }
61 void SetTaskLog(scoped_ptr<TaskLogger::TaskLog> task_log); 62 void SetTaskLog(scoped_ptr<TaskLogger::TaskLog> task_log);
62 scoped_ptr<TaskLogger::TaskLog> PassTaskLog(); 63 scoped_ptr<TaskLogger::TaskLog> PassTaskLog();
63 64
64 private: 65 private:
65 SyncTaskToken(const base::WeakPtr<SyncTaskManager>& manager, 66 SyncTaskToken(const base::WeakPtr<SyncTaskManager>& manager,
66 int64 token_id, 67 int64 token_id,
67 scoped_ptr<BlockingFactor> blocking_factor, 68 scoped_ptr<BlockingFactor> blocking_factor,
68 const SyncStatusCallback& callback); 69 const SyncStatusCallback& callback);
69 70
70 base::WeakPtr<SyncTaskManager> manager_; 71 base::WeakPtr<SyncTaskManager> manager_;
71 tracked_objects::Location location_; 72 tracked_objects::Location location_;
72 int64 token_id_; 73 int64 token_id_;
73 SyncStatusCallback callback_; 74 SyncStatusCallback callback_;
74 75
75 scoped_ptr<TaskLogger::TaskLog> task_log_; 76 scoped_ptr<TaskLogger::TaskLog> task_log_;
76 scoped_ptr<BlockingFactor> blocking_factor_; 77 scoped_ptr<BlockingFactor> blocking_factor_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(SyncTaskToken); 79 DISALLOW_COPY_AND_ASSIGN(SyncTaskToken);
79 }; 80 };
80 81
81 } // namespace drive_backend 82 } // namespace drive_backend
82 } // namespace sync_file_system 83 } // namespace sync_file_system
83 84
84 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_ 85 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_SYNC_TASK_TOKEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698