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

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: addressed scott's comments 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 void BlockUntilLocalChangeForTest(base::TimeDelta timeout); 226 void BlockUntilLocalChangeForTest(base::TimeDelta timeout);
227 227
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 #if defined(UNIT_TEST)
akalin 2012/11/10 00:08:40 i don't think we should use this ifdef. having di
akalin 2012/11/10 00:08:40 But see comments in unit test file -- I think you
kuan 2012/11/10 19:34:46 i assume u mean i can keep it?
237 // Returns synced session track.
238 SyncedSessionTracker& GetSyncedSessionTrackerForTest() {
akalin 2012/11/10 00:08:40 non-const refs are against style guide. please us
kuan 2012/11/10 19:34:46 function is removed.
239 return synced_session_tracker_;
240 }
241
242 // Wrapper for private PopulateSessionWindowFromSpecifics.
243 static void PopulateSessionWindowFromSpecificsForTest(
244 const std::string& foreign_session_tag,
245 const sync_pb::SessionWindow& window,
246 base::Time mtime,
247 SessionWindow* session_window,
248 SyncedSessionTracker* tracker) {
249 PopulateSessionWindowFromSpecifics(foreign_session_tag, window, mtime,
250 session_window, tracker);
251 }
252 #endif // defined(UNIT_TEST)
253
236 private: 254 private:
237 friend class SyncSessionModelAssociatorTest; 255 friend class SyncSessionModelAssociatorTest;
238 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, WriteSessionToNode); 256 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, WriteSessionToNode);
239 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, 257 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest,
240 WriteFilledSessionToNode); 258 WriteFilledSessionToNode);
241 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, 259 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest,
242 WriteForeignSessionToNode); 260 WriteForeignSessionToNode);
243 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolEmpty); 261 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolEmpty);
244 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolNonEmpty); 262 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, TabNodePoolNonEmpty);
245 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, ValidTabs); 263 FRIEND_TEST_ALL_PREFIXES(ProfileSyncServiceSessionTest, ValidTabs);
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_; 561 std::map<std::string, linked_ptr<SyncedFaviconInfo> > synced_favicons_;
544 // Map of page URL -> favicon url. 562 // Map of page URL -> favicon url.
545 std::map<std::string, std::string> synced_favicon_pages_; 563 std::map<std::string, std::string> synced_favicon_pages_;
546 564
547 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator); 565 DISALLOW_COPY_AND_ASSIGN(SessionModelAssociator);
548 }; 566 };
549 567
550 } // namespace browser_sync 568 } // namespace browser_sync
551 569
552 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_ 570 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_MODEL_ASSOCIATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698