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

Side by Side Diff: chrome/browser/sync/sessions/sessions_util.cc

Issue 1062013003: [Sync] Sync the chrome://history page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/sync/sessions/sessions_util.h" 5 #include "chrome/browser/sync/sessions/sessions_util.h"
6 6
7 #include "chrome/browser/sync/glue/synced_tab_delegate.h" 7 #include "chrome/browser/sync/glue/synced_tab_delegate.h"
8 #include "chrome/browser/sync/glue/synced_window_delegate.h" 8 #include "chrome/browser/sync/glue/synced_window_delegate.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/navigation_entry.h" 10 #include "content/public/browser/navigation_entry.h"
(...skipping 21 matching lines...) Expand all
32 const content::NavigationEntry* entry = (i == pending_index) ? 32 const content::NavigationEntry* entry = (i == pending_index) ?
33 tab.GetPendingEntry() : tab.GetEntryAtIndex(i); 33 tab.GetPendingEntry() : tab.GetEntryAtIndex(i);
34 if (!entry) 34 if (!entry)
35 return false; 35 return false;
36 const GURL& virtual_url = entry->GetVirtualURL(); 36 const GURL& virtual_url = entry->GetVirtualURL();
37 if (virtual_url.is_valid() && 37 if (virtual_url.is_valid() &&
38 !virtual_url.SchemeIs(content::kChromeUIScheme) && 38 !virtual_url.SchemeIs(content::kChromeUIScheme) &&
39 !virtual_url.SchemeIs(chrome::kChromeNativeScheme) && 39 !virtual_url.SchemeIs(chrome::kChromeNativeScheme) &&
40 !virtual_url.SchemeIsFile()) { 40 !virtual_url.SchemeIsFile()) {
41 found_valid_url = true; 41 found_valid_url = true;
42 } else if (virtual_url == GURL(chrome::kChromeUIHistoryURL)) {
43 // The history page is treated specially as we want it to trigger syncable
stanisc 2015/04/14 22:42:40 Wouldn't there be a race condition between the pag
Nicolas Zea 2015/04/16 17:30:30 Yes, but that's fine. Once we do model association
44 // events for UI purposes.
45 found_valid_url = true;
stanisc 2015/04/14 22:42:40 Perhaps break the loop (here and above) once the v
Nicolas Zea 2015/04/16 17:30:29 We actually deliberately keep looping to ensure th
42 } 46 }
43 } 47 }
44 return found_valid_url; 48 return found_valid_url;
45 } 49 }
46 50
47 } // namespace sessions_util 51 } // namespace sessions_util
48 52
49 } // namespace browser_sync 53 } // namespace browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698