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

Unified Diff: chrome/browser/sync_file_system/local/local_file_sync_context.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/local/local_file_sync_context.h
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context.h b/chrome/browser/sync_file_system/local/local_file_sync_context.h
index f0dc383dd9c0c3ce829f7a1b685abe31064bb28e..7d72280e78e903ac2d2839685a7e6ebb4ddd41e9 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_context.h
+++ b/chrome/browser/sync_file_system/local/local_file_sync_context.h
@@ -7,6 +7,7 @@
#include <deque>
#include <map>
+#include <memory>
#include <set>
#include <string>
#include <vector>
@@ -17,7 +18,6 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/timer/timer.h"
@@ -240,11 +240,11 @@ class LocalFileSyncContext
const std::string& /* name */,
base::File::Error error);
SyncStatusCode InitializeChangeTrackerOnFileThread(
- scoped_ptr<LocalFileChangeTracker>* tracker_ptr,
+ std::unique_ptr<LocalFileChangeTracker>* tracker_ptr,
storage::FileSystemContext* file_system_context,
std::set<GURL>* origins_with_changes);
void DidInitializeChangeTrackerOnIOThread(
- scoped_ptr<LocalFileChangeTracker>* tracker_ptr,
+ std::unique_ptr<LocalFileChangeTracker>* tracker_ptr,
const GURL& source_url,
storage::FileSystemContext* file_system_context,
std::set<GURL>* origins_with_changes,
@@ -254,14 +254,14 @@ class LocalFileSyncContext
SyncStatusCode status);
// Helper routines for GetFileForLocalSync.
- scoped_ptr<FileSystemURLQueue> GetNextURLsForSyncOnFileThread(
+ std::unique_ptr<FileSystemURLQueue> GetNextURLsForSyncOnFileThread(
storage::FileSystemContext* file_system_context);
void TryPrepareForLocalSync(storage::FileSystemContext* file_system_context,
const LocalFileSyncInfoCallback& callback,
- scoped_ptr<FileSystemURLQueue> urls);
+ std::unique_ptr<FileSystemURLQueue> urls);
void DidTryPrepareForLocalSync(
storage::FileSystemContext* file_system_context,
- scoped_ptr<FileSystemURLQueue> remaining_urls,
+ std::unique_ptr<FileSystemURLQueue> remaining_urls,
const LocalFileSyncInfoCallback& callback,
SyncStatusCode status,
const LocalFileSyncInfo& sync_file_info,
@@ -271,7 +271,7 @@ class LocalFileSyncContext
const storage::FileSystemURL& url);
void PromoteDemotedChangesForURLs(
storage::FileSystemContext* file_system_context,
- scoped_ptr<FileSystemURLQueue> url);
+ std::unique_ptr<FileSystemURLQueue> url);
// Callback routine for PrepareForSync and GetFileForLocalSync.
void DidGetWritingStatusForSync(
@@ -338,11 +338,11 @@ class LocalFileSyncContext
bool shutdown_on_io_; // Updated and referred only on IO thread.
// OperationRunner. This must be accessed only on IO thread.
- scoped_ptr<SyncableFileOperationRunner> operation_runner_;
+ std::unique_ptr<SyncableFileOperationRunner> operation_runner_;
// Keeps track of writing/syncing status.
// This must be accessed only on IO thread.
- scoped_ptr<LocalFileSyncStatus> sync_status_;
+ std::unique_ptr<LocalFileSyncStatus> sync_status_;
// Pointers to file system contexts that have been initialized for
// synchronization (i.e. that own this instance).
@@ -360,13 +360,13 @@ class LocalFileSyncContext
// Used only on IO thread for available changes notifications.
base::Time last_notified_changes_;
- scoped_ptr<base::OneShotTimer> timer_on_io_;
+ std::unique_ptr<base::OneShotTimer> timer_on_io_;
std::vector<base::Closure> pending_completion_callbacks_;
std::set<GURL> origins_with_pending_changes_;
// Populated while root directory deletion is being handled for
// ApplyRemoteChange(). Modified only on IO thread.
- scoped_ptr<RootDeleteHelper> root_delete_helper_;
+ std::unique_ptr<RootDeleteHelper> root_delete_helper_;
base::ObserverList<LocalOriginChangeObserver> origin_change_observers_;

Powered by Google App Engine
This is Rietveld 408576698