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

Side by Side Diff: sync/engine/directory_commit_contribution.h

Issue 1866243002: Convert //sync 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 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 SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_ 5 #ifndef SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_
6 #define SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_ 6 #define SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/scoped_ptr.h"
16 #include "sync/base/sync_export.h" 16 #include "sync/base/sync_export.h"
17 #include "sync/engine/commit_contribution.h" 17 #include "sync/engine/commit_contribution.h"
18 #include "sync/internal_api/public/base/model_type.h" 18 #include "sync/internal_api/public/base/model_type.h"
19 #include "sync/internal_api/public/util/syncer_error.h" 19 #include "sync/internal_api/public/util/syncer_error.h"
20 #include "sync/protocol/sync.pb.h" 20 #include "sync/protocol/sync.pb.h"
21 #include "sync/sessions/directory_type_debug_info_emitter.h" 21 #include "sync/sessions/directory_type_debug_info_emitter.h"
22 #include "sync/sessions/status_controller.h" 22 #include "sync/sessions/status_controller.h"
23 23
24 namespace syncer { 24 namespace syncer {
25 25
(...skipping 15 matching lines...) Expand all
41 public: 41 public:
42 // This destructor will DCHECK if UnsetSyncingBits() has not been called yet. 42 // This destructor will DCHECK if UnsetSyncingBits() has not been called yet.
43 ~DirectoryCommitContribution() override; 43 ~DirectoryCommitContribution() override;
44 44
45 // Build a CommitContribution from the IS_UNSYNCED items in |dir| with the 45 // Build a CommitContribution from the IS_UNSYNCED items in |dir| with the
46 // given |type|. The contribution will include at most |max_items| entries. 46 // given |type|. The contribution will include at most |max_items| entries.
47 // 47 //
48 // This function may return NULL if this type has no items ready for and 48 // This function may return NULL if this type has no items ready for and
49 // requiring commit. This function may make model neutral changes to the 49 // requiring commit. This function may make model neutral changes to the
50 // directory. 50 // directory.
51 static scoped_ptr<DirectoryCommitContribution> Build( 51 static std::unique_ptr<DirectoryCommitContribution> Build(
52 syncable::Directory* dir, 52 syncable::Directory* dir,
53 ModelType type, 53 ModelType type,
54 size_t max_items, 54 size_t max_items,
55 DirectoryTypeDebugInfoEmitter* debug_info_emitter); 55 DirectoryTypeDebugInfoEmitter* debug_info_emitter);
56 56
57 // Serialize this contribution's entries to the given commit request |msg|. 57 // Serialize this contribution's entries to the given commit request |msg|.
58 // 58 //
59 // This function is not const. It will update some state in this contribution 59 // This function is not const. It will update some state in this contribution
60 // that will be used when processing the associated commit response. This 60 // that will be used when processing the associated commit response. This
61 // function should not be called more than once. 61 // function should not be called more than once.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // A pointer to the commit counters of our parent CommitContributor. 108 // A pointer to the commit counters of our parent CommitContributor.
109 DirectoryTypeDebugInfoEmitter* debug_info_emitter_; 109 DirectoryTypeDebugInfoEmitter* debug_info_emitter_;
110 110
111 DISALLOW_COPY_AND_ASSIGN(DirectoryCommitContribution); 111 DISALLOW_COPY_AND_ASSIGN(DirectoryCommitContribution);
112 }; 112 };
113 113
114 } // namespace syncer 114 } // namespace syncer
115 115
116 #endif // SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_ 116 #endif // SYNC_ENGINE_DIRECTORY_COMMIT_CONTRIBUTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698