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

Side by Side Diff: chrome/browser/sync_file_system/local/local_file_change_tracker.h

Issue 1873683002: Convert //chrome/browser/sync_file_system from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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_LOCAL_LOCAL_FILE_CHANGE_TRACKER_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_CHANGE_TRACKER_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_CHANGE_TRACKER_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_CHANGE_TRACKER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
11 #include <map> 11 #include <map>
12 #include <memory>
12 #include <string> 13 #include <string>
13 14
14 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
15 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
16 #include "base/macros.h" 17 #include "base/macros.h"
17 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
18 #include "base/memory/scoped_ptr.h"
19 #include "base/synchronization/lock.h" 19 #include "base/synchronization/lock.h"
20 #include "chrome/browser/sync_file_system/file_change.h" 20 #include "chrome/browser/sync_file_system/file_change.h"
21 #include "chrome/browser/sync_file_system/sync_status_code.h" 21 #include "chrome/browser/sync_file_system/sync_status_code.h"
22 #include "storage/browser/fileapi/file_observers.h" 22 #include "storage/browser/fileapi/file_observers.h"
23 #include "storage/browser/fileapi/file_system_url.h" 23 #include "storage/browser/fileapi/file_system_url.h"
24 24
25 namespace base { 25 namespace base {
26 class SequencedTaskRunner; 26 class SequencedTaskRunner;
27 } 27 }
28 28
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 bool initialized_; 172 bool initialized_;
173 173
174 scoped_refptr<base::SequencedTaskRunner> file_task_runner_; 174 scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
175 175
176 FileChangeMap changes_; 176 FileChangeMap changes_;
177 ChangeSeqMap change_seqs_; 177 ChangeSeqMap change_seqs_;
178 178
179 FileChangeMap mirror_changes_; // For mirrors. 179 FileChangeMap mirror_changes_; // For mirrors.
180 FileChangeMap demoted_changes_; // For demoted changes. 180 FileChangeMap demoted_changes_; // For demoted changes.
181 181
182 scoped_ptr<TrackerDB> tracker_db_; 182 std::unique_ptr<TrackerDB> tracker_db_;
183 183
184 // Change sequence number. Briefly gives a hint about the order of changes, 184 // Change sequence number. Briefly gives a hint about the order of changes,
185 // but they are updated when a new change comes on the same file (as 185 // but they are updated when a new change comes on the same file (as
186 // well as Drive's changestamps). 186 // well as Drive's changestamps).
187 int64_t current_change_seq_number_; 187 int64_t current_change_seq_number_;
188 188
189 // This can be accessed on any threads (with num_changes_lock_). 189 // This can be accessed on any threads (with num_changes_lock_).
190 int64_t num_changes_; 190 int64_t num_changes_;
191 mutable base::Lock num_changes_lock_; 191 mutable base::Lock num_changes_lock_;
192 192
193 DISALLOW_COPY_AND_ASSIGN(LocalFileChangeTracker); 193 DISALLOW_COPY_AND_ASSIGN(LocalFileChangeTracker);
194 }; 194 };
195 195
196 } // namespace sync_file_system 196 } // namespace sync_file_system
197 197
198 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_CHANGE_TRACKER_H_ 198 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_LOCAL_LOCAL_FILE_CHANGE_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698