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

Side by Side Diff: chrome/browser/sync/glue/session_model_associator.h

Issue 11298004: alternate ntp: add "Recent Tabs" submenu to wrench menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed disposition, minor style cleanup Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GLUE_SESSION_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // Callback for when the session name has been computed. 228 // Callback for when the session name has been computed.
229 void OnSessionNameInitialized(const std::string& name); 229 void OnSessionNameInitialized(const std::string& name);
230 230
231 // If a valid favicon for the page at |url| is found, fills |png_favicon| with 231 // If a valid favicon for the page at |url| is found, fills |png_favicon| with
232 // the png-encoded image and returns true. Else, returns false. 232 // the png-encoded image and returns true. Else, returns false.
233 bool GetSyncedFaviconForPageURL(const std::string& url, 233 bool GetSyncedFaviconForPageURL(const std::string& url,
234 std::string* png_favicon) const; 234 std::string* png_favicon) const;
235 235
236 private: 236 private:
237 friend class SyncSessionModelAssociatorTest; 237 friend class SyncSessionModelAssociatorTest;
238 friend class SessionModelAssociatorForRecentTabsSubMenuModelTest;
akalin 2012/11/09 18:11:58 I'd prefer to instead expose a method like "Tracke
kuan 2012/11/09 18:17:17 i also need PopulateSessionWindowFromSpecifics. s
kuan 2012/11/09 20:27:52 Done. i've enclosed the functions within #ifdef U
238 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, WriteSessionToNode); 239 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, WriteSessionToNode);
239 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, 240 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest,
240 WriteFilledSessionToNode); 241 WriteFilledSessionToNode);
241 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, 242 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest,
242 WriteForeignSessionToNode); 243 WriteForeignSessionToNode);
243 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolEmpty); 244 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolEmpty);
244 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolNonEmpty); 245 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolNonEmpty);
245 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, ValidTabs); 246 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, ValidTabs);
246 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, ExistingTabs); 247 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, ExistingTabs);
247 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, MissingLocalTabNode); 248 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, MissingLocalTabNode);
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_; 544 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_;
544 // Map of page URL -> favicon url. 545 // Map of page URL -> favicon url.
545 std::map<std::string, std::string> synced_favicon_pages_; 546 std::map<std::string, std::string> synced_favicon_pages_;
546 547
547 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); 548 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator);
548 }; 549 };
549 550
550 } // namespace browser_sync 551 } // namespace browser_sync
551 552
552 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ 553 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698