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

Side by Side Diff: chrome/browser/sessions/session_service.cc

Issue 11280294: Revert 170932 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | webkit/dom_storage/dom_storage_context.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 (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/sessions/session_service.h" 5 #include "chrome/browser/sessions/session_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 new SessionCommand(kCommandTabNavigationPathPrunedFromFront, 430 new SessionCommand(kCommandTabNavigationPathPrunedFromFront,
431 sizeof(payload)); 431 sizeof(payload));
432 memcpy(command->contents(), &payload, sizeof(payload)); 432 memcpy(command->contents(), &payload, sizeof(payload));
433 ScheduleCommand(command); 433 ScheduleCommand(command);
434 } 434 }
435 435
436 void SessionService::UpdateTabNavigation( 436 void SessionService::UpdateTabNavigation(
437 const SessionID& window_id, 437 const SessionID& window_id,
438 const SessionID& tab_id, 438 const SessionID& tab_id,
439 const TabNavigation& navigation) { 439 const TabNavigation& navigation) {
440 LOG(ERROR) << "UpdateTabNavigation, title: " << navigation.title();
441 if (!ShouldTrackEntry(navigation.virtual_url()) || 440 if (!ShouldTrackEntry(navigation.virtual_url()) ||
442 !ShouldTrackChangesToWindow(window_id)) { 441 !ShouldTrackChangesToWindow(window_id)) {
443 return; 442 return;
444 } 443 }
445 444
446 if (tab_to_available_range_.find(tab_id.id()) != 445 if (tab_to_available_range_.find(tab_id.id()) !=
447 tab_to_available_range_.end()) { 446 tab_to_available_range_.end()) {
448 std::pair<int, int>& range = tab_to_available_range_[tab_id.id()]; 447 std::pair<int, int>& range = tab_to_available_range_[tab_id.id()];
449 range.first = std::min(navigation.index(), range.first); 448 range.first = std::min(navigation.index(), range.first);
450 range.second = std::max(navigation.index(), range.second); 449 range.second = std::max(navigation.index(), range.second);
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 contents->GetController().GetDefaultSessionStorageNamespace(); 1776 contents->GetController().GetDefaultSessionStorageNamespace();
1778 session_storage_namespace->SetShouldPersist(false); 1777 session_storage_namespace->SetShouldPersist(false);
1779 SessionTabHelper* session_tab_helper = 1778 SessionTabHelper* session_tab_helper =
1780 SessionTabHelper::FromWebContents(contents); 1779 SessionTabHelper::FromWebContents(contents);
1781 TabClosed(session_tab_helper->window_id(), 1780 TabClosed(session_tab_helper->window_id(),
1782 session_tab_helper->session_id(), 1781 session_tab_helper->session_id(),
1783 contents->GetClosedByUserGesture()); 1782 contents->GetClosedByUserGesture());
1784 RecordSessionUpdateHistogramData(content::NOTIFICATION_WEB_CONTENTS_DESTROYED, 1783 RecordSessionUpdateHistogramData(content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
1785 &last_updated_tab_closed_time_); 1784 &last_updated_tab_closed_time_);
1786 } 1785 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_restore.cc ('k') | webkit/dom_storage/dom_storage_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698