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

Side by Side Diff: chrome/browser/sync/engine/build_commit_command.h

Issue 8470005: Add OVERRIDE to chrome/browser/sync/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: includes Created 9 years, 1 month 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_ENGINE_BUILD_COMMIT_COMMAND_H_ 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
6 #define CHROME_BROWSER_SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_ 6 #define CHROME_BROWSER_SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
10 #include "chrome/browser/sync/engine/syncer_command.h" 11 #include "chrome/browser/sync/engine/syncer_command.h"
11 #include "chrome/browser/sync/engine/syncproto.h" 12 #include "chrome/browser/sync/engine/syncproto.h"
12 #include "chrome/browser/sync/syncable/syncable.h" 13 #include "chrome/browser/sync/syncable/syncable.h"
13 14
14 namespace browser_sync { 15 namespace browser_sync {
15 16
16 class BuildCommitCommand : public SyncerCommand { 17 class BuildCommitCommand : public SyncerCommand {
17 public: 18 public:
18 BuildCommitCommand(); 19 BuildCommitCommand();
19 virtual ~BuildCommitCommand(); 20 virtual ~BuildCommitCommand();
20 21
21 // SyncerCommand implementation. 22 // SyncerCommand implementation.
22 virtual void ExecuteImpl(sessions::SyncSession* session); 23 virtual void ExecuteImpl(sessions::SyncSession* session) OVERRIDE;
23 24
24 private: 25 private:
25 FRIEND_TEST_ALL_PREFIXES(BuildCommitCommandTest, InterpolatePosition); 26 FRIEND_TEST_ALL_PREFIXES(BuildCommitCommandTest, InterpolatePosition);
26 27
27 // Functions returning constants controlling range of values. 28 // Functions returning constants controlling range of values.
28 static int64 GetFirstPosition(); 29 static int64 GetFirstPosition();
29 static int64 GetLastPosition(); 30 static int64 GetLastPosition();
30 static int64 GetGap(); 31 static int64 GetGap();
31 32
32 void AddExtensionsActivityToMessage(sessions::SyncSession* session, 33 void AddExtensionsActivityToMessage(sessions::SyncSession* session,
33 CommitMessage* message); 34 CommitMessage* message);
34 // Helper for computing position. Find the numeric position value 35 // Helper for computing position. Find the numeric position value
35 // of the closest already-synced entry. |direction| must be one of 36 // of the closest already-synced entry. |direction| must be one of
36 // NEXT_ID or PREV_ID; this parameter controls the search direction. 37 // NEXT_ID or PREV_ID; this parameter controls the search direction.
37 // For an open range (no predecessor or successor), the return 38 // For an open range (no predecessor or successor), the return
38 // value will be kFirstPosition or kLastPosition. 39 // value will be kFirstPosition or kLastPosition.
39 int64 FindAnchorPosition(syncable::IdField direction, 40 int64 FindAnchorPosition(syncable::IdField direction,
40 const syncable::Entry& entry); 41 const syncable::Entry& entry);
41 // Given two values of the type returned by FindAnchorPosition, 42 // Given two values of the type returned by FindAnchorPosition,
42 // compute a third value in between the two ranges. 43 // compute a third value in between the two ranges.
43 int64 InterpolatePosition(int64 lo, int64 hi); 44 int64 InterpolatePosition(int64 lo, int64 hi);
44 45
45 DISALLOW_COPY_AND_ASSIGN(BuildCommitCommand); 46 DISALLOW_COPY_AND_ASSIGN(BuildCommitCommand);
46 }; 47 };
47 48
48 } // namespace browser_sync 49 } // namespace browser_sync
49 50
50 #endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_ 51 #endif // CHROME_BROWSER_SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698