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

Side by Side Diff: components/history/core/browser/typed_url_syncable_service.h

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 4 years, 12 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 COMPONENTS_HISTORY_CORE_BROWSER_TYPED_URL_SYNCABLE_SERVICE_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_TYPED_URL_SYNCABLE_SERVICE_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_TYPED_URL_SYNCABLE_SERVICE_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_TYPED_URL_SYNCABLE_SERVICE_H_
7 7
8 #include <stdint.h>
9
8 #include <set> 10 #include <set>
9 #include <vector> 11 #include <vector>
10 12
13 #include "base/macros.h"
11 #include "base/scoped_observer.h" 14 #include "base/scoped_observer.h"
12 #include "base/threading/thread_checker.h" 15 #include "base/threading/thread_checker.h"
13 #include "components/history/core/browser/history_backend_observer.h" 16 #include "components/history/core/browser/history_backend_observer.h"
14 #include "components/history/core/browser/history_types.h" 17 #include "components/history/core/browser/history_types.h"
15 #include "sync/api/sync_change.h" 18 #include "sync/api/sync_change.h"
16 #include "sync/api/sync_data.h" 19 #include "sync/api/sync_data.h"
17 #include "sync/api/sync_error.h" 20 #include "sync/api/sync_error.h"
18 #include "sync/api/sync_error_factory.h" 21 #include "sync/api/sync_error_factory.h"
19 #include "sync/api/syncable_service.h" 22 #include "sync/api/syncable_service.h"
20 #include "ui/base/page_transition_types.h" 23 #include "ui/base/page_transition_types.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // This is a helper map used only in Merge/Process* functions. The lifetime 91 // This is a helper map used only in Merge/Process* functions. The lifetime
89 // of the iterator is longer than the map object. 92 // of the iterator is longer than the map object.
90 typedef std::map<GURL, std::pair<syncer::SyncChange::SyncChangeType, URLRow>> 93 typedef std::map<GURL, std::pair<syncer::SyncChange::SyncChangeType, URLRow>>
91 TypedUrlMap; 94 TypedUrlMap;
92 95
93 // This is a helper map used to associate visit vectors from the history db 96 // This is a helper map used to associate visit vectors from the history db
94 // to the typed urls in the above map. 97 // to the typed urls in the above map.
95 typedef std::map<GURL, VisitVector> UrlVisitVectorMap; 98 typedef std::map<GURL, VisitVector> UrlVisitVectorMap;
96 99
97 // Bitfield returned from MergeUrls to specify the result of a merge. 100 // Bitfield returned from MergeUrls to specify the result of a merge.
98 typedef uint32 MergeResult; 101 typedef uint32_t MergeResult;
99 static const MergeResult DIFF_NONE = 0; 102 static const MergeResult DIFF_NONE = 0;
100 static const MergeResult DIFF_UPDATE_NODE = 1 << 0; 103 static const MergeResult DIFF_UPDATE_NODE = 1 << 0;
101 static const MergeResult DIFF_LOCAL_ROW_CHANGED = 1 << 1; 104 static const MergeResult DIFF_LOCAL_ROW_CHANGED = 1 << 1;
102 static const MergeResult DIFF_LOCAL_VISITS_ADDED = 1 << 2; 105 static const MergeResult DIFF_LOCAL_VISITS_ADDED = 1 << 2;
103 106
104 // Helper method for getting the set of synced urls. 107 // Helper method for getting the set of synced urls.
105 // Set it as virtual for testing. 108 // Set it as virtual for testing.
106 void GetSyncedUrls(std::set<GURL>* urls) const; 109 void GetSyncedUrls(std::set<GURL>* urls) const;
107 110
108 // Helper function that clears our error counters (used to reset stats after 111 // Helper function that clears our error counters (used to reset stats after
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 239
237 ScopedObserver<history::HistoryBackend, history::HistoryBackendObserver> 240 ScopedObserver<history::HistoryBackend, history::HistoryBackendObserver>
238 history_backend_observer_; 241 history_backend_observer_;
239 242
240 DISALLOW_COPY_AND_ASSIGN(TypedUrlSyncableService); 243 DISALLOW_COPY_AND_ASSIGN(TypedUrlSyncableService);
241 }; 244 };
242 245
243 } // namespace history 246 } // namespace history
244 247
245 #endif // COMPONENTS_HISTORY_CORE_BROWSER_TYPED_URL_SYNCABLE_SERVICE_H_ 248 #endif // COMPONENTS_HISTORY_CORE_BROWSER_TYPED_URL_SYNCABLE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698