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

Side by Side Diff: ios/web/web_state/web_state_impl.mm

Issue 2802613005: Add a comment and DCHECK to require |session_storage| to be non-nil in WebState::CreateWithStorageS… (Closed)
Patch Set: Created 3 years, 8 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 | « ios/web/public/web_state/web_state.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/web/web_state/web_state_impl.h" 5 #import "ios/web/web_state/web_state_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 web_state->GetNavigationManagerImpl().InitializeSession(); 50 web_state->GetNavigationManagerImpl().InitializeSession();
51 51
52 // TODO(crbug.com/703565): remove std::move() once Xcode 9.0+ is required. 52 // TODO(crbug.com/703565): remove std::move() once Xcode 9.0+ is required.
53 return std::move(web_state); 53 return std::move(web_state);
54 } 54 }
55 55
56 /* static */ 56 /* static */
57 std::unique_ptr<WebState> WebState::CreateWithStorageSession( 57 std::unique_ptr<WebState> WebState::CreateWithStorageSession(
58 const CreateParams& params, 58 const CreateParams& params,
59 CRWSessionStorage* session_storage) { 59 CRWSessionStorage* session_storage) {
60 DCHECK(session_storage);
60 std::unique_ptr<WebStateImpl> web_state( 61 std::unique_ptr<WebStateImpl> web_state(
61 new WebStateImpl(params, session_storage)); 62 new WebStateImpl(params, session_storage));
62 63
63 // TODO(crbug.com/703565): remove std::move() once Xcode 9.0+ is required. 64 // TODO(crbug.com/703565): remove std::move() once Xcode 9.0+ is required.
64 return std::move(web_state); 65 return std::move(web_state);
65 } 66 }
66 67
67 WebStateImpl::WebStateImpl(const CreateParams& params) 68 WebStateImpl::WebStateImpl(const CreateParams& params)
68 : WebStateImpl(params, nullptr) {} 69 : WebStateImpl(params, nullptr) {}
69 70
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 const LoadCommittedDetails& load_details) { 787 const LoadCommittedDetails& load_details) {
787 for (auto& observer : observers_) 788 for (auto& observer : observers_)
788 observer.NavigationItemCommitted(load_details); 789 observer.NavigationItemCommitted(load_details);
789 } 790 }
790 791
791 WebState* WebStateImpl::GetWebState() { 792 WebState* WebStateImpl::GetWebState() {
792 return this; 793 return this;
793 } 794 }
794 795
795 } // namespace web 796 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/web_state/web_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698