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

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

Issue 149643010: Cleanup: Move kChromeUIScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/sync/glue/session_model_associator.h" 5 #include "chrome/browser/sync/glue/session_model_associator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 1131
1132 int pending_index = tab.GetPendingEntryIndex(); 1132 int pending_index = tab.GetPendingEntryIndex();
1133 bool found_valid_url = false; 1133 bool found_valid_url = false;
1134 for (int i = 0; i < entry_count; ++i) { 1134 for (int i = 0; i < entry_count; ++i) {
1135 const content::NavigationEntry* entry = (i == pending_index) ? 1135 const content::NavigationEntry* entry = (i == pending_index) ?
1136 tab.GetPendingEntry() : tab.GetEntryAtIndex(i); 1136 tab.GetPendingEntry() : tab.GetEntryAtIndex(i);
1137 if (!entry) 1137 if (!entry)
1138 return false; 1138 return false;
1139 const GURL& virtual_url = entry->GetVirtualURL(); 1139 const GURL& virtual_url = entry->GetVirtualURL();
1140 if (virtual_url.is_valid() && 1140 if (virtual_url.is_valid() &&
1141 !virtual_url.SchemeIs(chrome::kChromeUIScheme) && 1141 !virtual_url.SchemeIs(content::kChromeUIScheme) &&
1142 !virtual_url.SchemeIs(chrome::kChromeNativeScheme) && 1142 !virtual_url.SchemeIs(chrome::kChromeNativeScheme) &&
1143 !virtual_url.SchemeIsFile()) { 1143 !virtual_url.SchemeIsFile()) {
1144 found_valid_url = true; 1144 found_valid_url = true;
1145 } 1145 }
1146 } 1146 }
1147 return found_valid_url; 1147 return found_valid_url;
1148 } 1148 }
1149 1149
1150 // If this functionality changes, browser_sync::ShouldSyncSessionTab should be 1150 // If this functionality changes, browser_sync::ShouldSyncSessionTab should be
1151 // modified to match. 1151 // modified to match.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 tab_s->set_tab_id(new_tab_id); 1210 tab_s->set_tab_id(new_tab_id);
1211 tab_node.SetSessionSpecifics(session_specifics); 1211 tab_node.SetSessionSpecifics(session_specifics);
1212 // Update tab node pool with the new association. 1212 // Update tab node pool with the new association.
1213 local_tab_pool_.ReassociateTabNode(tab_node_id, new_tab_id); 1213 local_tab_pool_.ReassociateTabNode(tab_node_id, new_tab_id);
1214 } 1214 }
1215 } 1215 }
1216 } 1216 }
1217 } 1217 }
1218 1218
1219 } // namespace browser_sync 1219 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sessions/base_session_service.cc ('k') | chrome/browser/sync/glue/synced_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698