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_V1_ORIGIN_OPERATION_QUEUE_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_ORIGIN_OPERATION_QUEUE_H_
11 #include "base/basictypes.h"
14 namespace sync_file_system {
16 struct OriginOperation {
29 OriginOperation(const GURL& origin, Type type);
33 class OriginOperationQueue {
35 OriginOperationQueue();
36 ~OriginOperationQueue();
38 void Push(const GURL& origin, OriginOperation::Type type);
39 OriginOperation Pop();
40 bool HasPendingOperation(const GURL& origin) const;
42 size_t size() const { return queue_.size(); }
43 bool empty() const { return queue_.empty(); }
46 std::deque<OriginOperation> queue_;
49 } // namespace sync_file_system
51 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_V1_ORIGIN_OPERATION_QUEUE_H_