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/tab_contents/navigation_controller_impl.h" | 5 #include "content/browser/tab_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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 tab_contents_(contents), | 180 tab_contents_(contents), |
181 max_restored_page_id_(-1), | 181 max_restored_page_id_(-1), |
182 ALLOW_THIS_IN_INITIALIZER_LIST(ssl_manager_(this)), | 182 ALLOW_THIS_IN_INITIALIZER_LIST(ssl_manager_(this)), |
183 needs_reload_(false), | 183 needs_reload_(false), |
184 session_storage_namespace_(session_storage_namespace), | 184 session_storage_namespace_(session_storage_namespace), |
185 pending_reload_(NO_RELOAD) { | 185 pending_reload_(NO_RELOAD) { |
186 DCHECK(browser_context_); | 186 DCHECK(browser_context_); |
187 if (!session_storage_namespace_) { | 187 if (!session_storage_namespace_) { |
188 session_storage_namespace_ = new SessionStorageNamespaceImpl( | 188 session_storage_namespace_ = new SessionStorageNamespaceImpl( |
189 static_cast<DOMStorageContextImpl*>( | 189 static_cast<DOMStorageContextImpl*>( |
190 DOMStorageContext::GetForBrowserContext(browser_context_))); | 190 BrowserContext::GetDOMStorageContext(browser_context_))); |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 NavigationControllerImpl::~NavigationControllerImpl() { | 194 NavigationControllerImpl::~NavigationControllerImpl() { |
195 DiscardNonCommittedEntriesInternal(); | 195 DiscardNonCommittedEntriesInternal(); |
196 | 196 |
197 content::NotificationService::current()->Notify( | 197 content::NotificationService::current()->Notify( |
198 content::NOTIFICATION_TAB_CLOSED, | 198 content::NOTIFICATION_TAB_CLOSED, |
199 content::Source<NavigationController>(this), | 199 content::Source<NavigationController>(this), |
200 content::NotificationService::NoDetails()); | 200 content::NotificationService::NoDetails()); |
(...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 for (int i = 0; i < max_index; i++) { | 1414 for (int i = 0; i < max_index; i++) { |
1415 // When cloning a tab, copy all entries except interstitial pages | 1415 // When cloning a tab, copy all entries except interstitial pages |
1416 if (source.entries_[i].get()->GetPageType() != | 1416 if (source.entries_[i].get()->GetPageType() != |
1417 content::PAGE_TYPE_INTERSTITIAL) { | 1417 content::PAGE_TYPE_INTERSTITIAL) { |
1418 entries_.insert(entries_.begin() + insert_index++, | 1418 entries_.insert(entries_.begin() + insert_index++, |
1419 linked_ptr<NavigationEntryImpl>( | 1419 linked_ptr<NavigationEntryImpl>( |
1420 new NavigationEntryImpl(*source.entries_[i]))); | 1420 new NavigationEntryImpl(*source.entries_[i]))); |
1421 } | 1421 } |
1422 } | 1422 } |
1423 } | 1423 } |
OLD | NEW |