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

Side by Side Diff: chrome/browser/sync/test/integration/sessions_helper.cc

Issue 11054025: [Sync] Add HTTP status codes to NavigationEntry and TabNavigation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 (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 #include "chrome/browser/sync/test/integration/sessions_helper.h" 5 #include "chrome/browser/sync/test/integration/sessions_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 it->second->tabs.begin(); 83 it->second->tabs.begin();
84 tab_it != it->second->tabs.end(); ++tab_it) { 84 tab_it != it->second->tabs.end(); ++tab_it) {
85 if ((*tab_it)->navigations.size() == 0) { 85 if ((*tab_it)->navigations.size() == 0) {
86 DVLOG(1) << "Empty navigations vector"; 86 DVLOG(1) << "Empty navigations vector";
87 continue; 87 continue;
88 } 88 }
89 nav_index = (*tab_it)->current_navigation_index; 89 nav_index = (*tab_it)->current_navigation_index;
90 nav = (*tab_it)->navigations[nav_index]; 90 nav = (*tab_it)->navigations[nav_index];
91 if (nav.virtual_url() == url) { 91 if (nav.virtual_url() == url) {
92 DVLOG(1) << "Found tab with url " << url.spec(); 92 DVLOG(1) << "Found tab with url " << url.spec();
93 DVLOG(1) << "Timestamp is " << nav.timestamp().ToInternalValue(); 93 DVLOG(1) << "Timestamp is "
94 << SessionTypesTestHelper::GetTimestamp(nav).ToInternalValue();
94 if (nav.title().empty()) { 95 if (nav.title().empty()) {
95 DVLOG(1) << "Title empty -- tab hasn't finished loading yet"; 96 DVLOG(1) << "Title empty -- tab hasn't finished loading yet";
96 continue; 97 continue;
97 } 98 }
98 return true; 99 return true;
99 } 100 }
100 } 101 }
101 } 102 }
102 DVLOG(1) << "Could not find tab with url " << url.spec(); 103 DVLOG(1) << "Could not find tab with url " << url.spec();
103 return false; 104 return false;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 return true; 316 return true;
316 } 317 }
317 318
318 void DeleteForeignSession(int index, std::string session_tag) { 319 void DeleteForeignSession(int index, std::string session_tag) {
319 ProfileSyncServiceFactory::GetInstance()->GetForProfile( 320 ProfileSyncServiceFactory::GetInstance()->GetForProfile(
320 test()->GetProfile(index))-> 321 test()->GetProfile(index))->
321 GetSessionModelAssociator()->DeleteForeignSession(session_tag); 322 GetSessionModelAssociator()->DeleteForeignSession(session_tag);
322 } 323 }
323 324
324 } // namespace sessions_helper 325 } // namespace sessions_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698