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

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

Issue 10831116: Move SessionStorageNamespace entirely into NavigationController and support StoragePartitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 8 years, 4 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/sessions/tab_restore_service.h" 5 #include "chrome/browser/sessions/tab_restore_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 10
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 TabContents* tab_contents = 539 TabContents* tab_contents =
540 TabContents::FromWebContents(controller->GetWebContents()); 540 TabContents::FromWebContents(controller->GetWebContents());
541 // tab_contents is NULL in some browser tests. 541 // tab_contents is NULL in some browser tests.
542 if (tab_contents) { 542 if (tab_contents) {
543 const extensions::Extension* extension = 543 const extensions::Extension* extension =
544 tab_contents->extension_tab_helper()->extension_app(); 544 tab_contents->extension_tab_helper()->extension_app();
545 if (extension) 545 if (extension)
546 tab->extension_app_id = extension->id(); 546 tab->extension_app_id = extension->id();
547 } 547 }
548 548
549 tab->session_storage_namespace = controller->GetSessionStorageNamespace(); 549 // TODO(ajwong): This does not correctly handle storage for isolated apps.
550 tab->session_storage_namespace =
551 controller->GetDefaultSessionStorageNamespace();
550 552
551 // Delegate may be NULL during unit tests. 553 // Delegate may be NULL during unit tests.
552 if (delegate) { 554 if (delegate) {
553 tab->browser_id = delegate->GetSessionID().id(); 555 tab->browser_id = delegate->GetSessionID().id();
554 tab->pinned = delegate->IsTabPinned(tab->tabstrip_index); 556 tab->pinned = delegate->IsTabPinned(tab->tabstrip_index);
555 } 557 }
556 } 558 }
557 559
558 void TabRestoreService::NotifyTabsChanged() { 560 void TabRestoreService::NotifyTabsChanged() {
559 FOR_EACH_OBSERVER(TabRestoreServiceObserver, observer_list_, 561 FOR_EACH_OBSERVER(TabRestoreServiceObserver, observer_list_,
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 // the front, not the end and we just added the entries to the end). 1246 // the front, not the end and we just added the entries to the end).
1245 entries_to_write_ = staging_entries_.size(); 1247 entries_to_write_ = staging_entries_.size();
1246 1248
1247 PruneEntries(); 1249 PruneEntries();
1248 NotifyTabsChanged(); 1250 NotifyTabsChanged();
1249 } 1251 }
1250 1252
1251 Time TabRestoreService::TimeNow() const { 1253 Time TabRestoreService::TimeNow() const {
1252 return time_factory_ ? time_factory_->TimeNow() : Time::Now(); 1254 return time_factory_ ? time_factory_->TimeNow() : Time::Now();
1253 } 1255 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/tab_contents/background_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698