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

Side by Side Diff: chrome/browser/sync/sessions/sessions_sync_manager.h

Issue 495593003: Avoid memory corruption in sessions sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
6 #define CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 6 #define CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 void AssociateRestoredPlaceholderTab( 316 void AssociateRestoredPlaceholderTab(
317 const SyncedTabDelegate& tab_delegate, 317 const SyncedTabDelegate& tab_delegate,
318 SessionID::id_type new_tab_id, 318 SessionID::id_type new_tab_id,
319 const syncer::SyncDataList& restored_tabs, 319 const syncer::SyncDataList& restored_tabs,
320 syncer::SyncChangeList* change_output); 320 syncer::SyncChangeList* change_output);
321 321
322 // Stops and re-starts syncing to rebuild association mappings. 322 // Stops and re-starts syncing to rebuild association mappings.
323 // See |local_tab_pool_out_of_sync_|. 323 // See |local_tab_pool_out_of_sync_|.
324 void RebuildAssociations(); 324 void RebuildAssociations();
325 325
326 // Validates the content of a SessionHeader protobuf.
327 // Returns false if validation fails.
328 static bool IsValidSessionHeader(const sync_pb::SessionHeader& header);
329
326 // Mapping of current open (local) tabs to their sync identifiers. 330 // Mapping of current open (local) tabs to their sync identifiers.
327 TabLinksMap local_tab_map_; 331 TabLinksMap local_tab_map_;
328 332
329 SyncedSessionTracker session_tracker_; 333 SyncedSessionTracker session_tracker_;
330 FaviconCache favicon_cache_; 334 FaviconCache favicon_cache_;
331 335
332 // Pool of used/available sync nodes associated with local tabs. 336 // Pool of used/available sync nodes associated with local tabs.
333 TabNodePool local_tab_pool_; 337 TabNodePool local_tab_pool_;
334 338
335 // Tracks whether our local representation of which sync nodes map to what 339 // Tracks whether our local representation of which sync nodes map to what
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 371
368 scoped_ptr<LocalSessionEventRouter> local_event_router_; 372 scoped_ptr<LocalSessionEventRouter> local_event_router_;
369 scoped_ptr<SyncedWindowDelegatesGetter> synced_window_getter_; 373 scoped_ptr<SyncedWindowDelegatesGetter> synced_window_getter_;
370 374
371 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager); 375 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager);
372 }; 376 };
373 377
374 } // namespace browser_sync 378 } // namespace browser_sync
375 379
376 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ 380 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/synced_session_tracker.cc ('k') | chrome/browser/sync/sessions/sessions_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698