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

Side by Side Diff: ios/chrome/browser/tabs/tab_model.mm

Issue 2894553003: Add |web_usage_enabled| to DeserializeWebStateList() (Closed)
Patch Set: Eugene's comments Created 3 years, 7 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 | ios/chrome/browser/web_state_list/web_state_list_serialization.h » ('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 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 #import "ios/chrome/browser/tabs/tab_model.h" 5 #import "ios/chrome/browser/tabs/tab_model.h"
6 6
7 #include <cstdint> 7 #include <cstdint>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 DCHECK(window); 701 DCHECK(window);
702 702
703 if (!window.sessions.count) 703 if (!window.sessions.count)
704 return NO; 704 return NO;
705 705
706 int oldCount = _webStateList->count(); 706 int oldCount = _webStateList->count();
707 DCHECK_GE(oldCount, 0); 707 DCHECK_GE(oldCount, 0);
708 708
709 web::WebState::CreateParams createParams(_browserState); 709 web::WebState::CreateParams createParams(_browserState);
710 DeserializeWebStateList( 710 DeserializeWebStateList(
711 _webStateList.get(), window, 711 _webStateList.get(), window, webUsageEnabled_,
712 base::BindRepeating(&web::WebState::CreateWithStorageSession, 712 base::BindRepeating(&web::WebState::CreateWithStorageSession,
713 createParams)); 713 createParams));
714 714
715 DCHECK_GT(_webStateList->count(), oldCount); 715 DCHECK_GT(_webStateList->count(), oldCount);
716 int restoredCount = _webStateList->count() - oldCount; 716 int restoredCount = _webStateList->count() - oldCount;
717 DCHECK_EQ(window.sessions.count, static_cast<NSUInteger>(restoredCount)); 717 DCHECK_EQ(window.sessions.count, static_cast<NSUInteger>(restoredCount));
718 718
719 scoped_refptr<web::CertificatePolicyCache> policyCache = 719 scoped_refptr<web::CertificatePolicyCache> policyCache =
720 web::BrowserState::GetCertificatePolicyCache(_browserState); 720 web::BrowserState::GetCertificatePolicyCache(_browserState);
721 721
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 } 788 }
789 789
790 // Called when UIApplicationWillEnterForegroundNotification is received. 790 // Called when UIApplicationWillEnterForegroundNotification is received.
791 - (void)applicationWillEnterForeground:(NSNotification*)notify { 791 - (void)applicationWillEnterForeground:(NSNotification*)notify {
792 if (_tabUsageRecorder) { 792 if (_tabUsageRecorder) {
793 _tabUsageRecorder->AppWillEnterForeground(); 793 _tabUsageRecorder->AppWillEnterForeground();
794 } 794 }
795 } 795 }
796 796
797 @end 797 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/web_state_list/web_state_list_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698