OLD | NEW |
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 "content/browser/web_contents/navigation_controller_impl.h" | 5 #include "content/browser/web_contents/navigation_controller_impl.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_number_conversions.h" // Temporary | 9 #include "base/string_number_conversions.h" // Temporary |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 web_contents_(web_contents), | 187 web_contents_(web_contents), |
188 max_restored_page_id_(-1), | 188 max_restored_page_id_(-1), |
189 ALLOW_THIS_IN_INITIALIZER_LIST(ssl_manager_(this)), | 189 ALLOW_THIS_IN_INITIALIZER_LIST(ssl_manager_(this)), |
190 needs_reload_(false), | 190 needs_reload_(false), |
191 session_storage_namespace_(session_storage_namespace), | 191 session_storage_namespace_(session_storage_namespace), |
192 pending_reload_(NO_RELOAD) { | 192 pending_reload_(NO_RELOAD) { |
193 DCHECK(browser_context_); | 193 DCHECK(browser_context_); |
194 if (!session_storage_namespace_) { | 194 if (!session_storage_namespace_) { |
195 session_storage_namespace_ = new SessionStorageNamespaceImpl( | 195 session_storage_namespace_ = new SessionStorageNamespaceImpl( |
196 static_cast<DOMStorageContextImpl*>( | 196 static_cast<DOMStorageContextImpl*>( |
197 BrowserContext::GetDOMStorageContext(browser_context_))); | 197 BrowserContext::GetDefaultDOMStorageContext(browser_context_))); |
198 } | 198 } |
199 } | 199 } |
200 | 200 |
201 NavigationControllerImpl::~NavigationControllerImpl() { | 201 NavigationControllerImpl::~NavigationControllerImpl() { |
202 DiscardNonCommittedEntriesInternal(); | 202 DiscardNonCommittedEntriesInternal(); |
203 } | 203 } |
204 | 204 |
205 WebContents* NavigationControllerImpl::GetWebContents() const { | 205 WebContents* NavigationControllerImpl::GetWebContents() const { |
206 return web_contents_; | 206 return web_contents_; |
207 } | 207 } |
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 for (int i = 0; i < max_index; i++) { | 1454 for (int i = 0; i < max_index; i++) { |
1455 // When cloning a tab, copy all entries except interstitial pages | 1455 // When cloning a tab, copy all entries except interstitial pages |
1456 if (source.entries_[i].get()->GetPageType() != | 1456 if (source.entries_[i].get()->GetPageType() != |
1457 content::PAGE_TYPE_INTERSTITIAL) { | 1457 content::PAGE_TYPE_INTERSTITIAL) { |
1458 entries_.insert(entries_.begin() + insert_index++, | 1458 entries_.insert(entries_.begin() + insert_index++, |
1459 linked_ptr<NavigationEntryImpl>( | 1459 linked_ptr<NavigationEntryImpl>( |
1460 new NavigationEntryImpl(*source.entries_[i]))); | 1460 new NavigationEntryImpl(*source.entries_[i]))); |
1461 } | 1461 } |
1462 } | 1462 } |
1463 } | 1463 } |
OLD | NEW |