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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 | 1282 |
1283 SessionStorageNamespace* | 1283 SessionStorageNamespace* |
1284 NavigationControllerImpl::GetSessionStorageNamespace( | 1284 NavigationControllerImpl::GetSessionStorageNamespace( |
1285 content::SiteInstance* instance) { | 1285 content::SiteInstance* instance) { |
1286 std::string partition_id; | 1286 std::string partition_id; |
1287 if (instance) { | 1287 if (instance) { |
1288 // TODO(ajwong): When GetDefaultSessionStorageNamespace() goes away, remove | 1288 // TODO(ajwong): When GetDefaultSessionStorageNamespace() goes away, remove |
1289 // this if statement so |instance| must not be NULL. | 1289 // this if statement so |instance| must not be NULL. |
1290 partition_id = | 1290 partition_id = |
1291 GetContentClient()->browser()->GetStoragePartitionIdForSite( | 1291 GetContentClient()->browser()->GetStoragePartitionIdForSite( |
1292 browser_context_, instance->GetSite()); | 1292 browser_context_, instance->GetSiteURL()); |
1293 } | 1293 } |
1294 | 1294 |
1295 SessionStorageNamespaceMap::const_iterator it = | 1295 SessionStorageNamespaceMap::const_iterator it = |
1296 session_storage_namespace_map_.find(partition_id); | 1296 session_storage_namespace_map_.find(partition_id); |
1297 if (it != session_storage_namespace_map_.end()) | 1297 if (it != session_storage_namespace_map_.end()) |
1298 return it->second.get(); | 1298 return it->second.get(); |
1299 | 1299 |
1300 // Create one if no one has accessed session storage for this partition yet. | 1300 // Create one if no one has accessed session storage for this partition yet. |
1301 // | 1301 // |
1302 // TODO(ajwong): Should this use the |partition_id| directly rather than | 1302 // TODO(ajwong): Should this use the |partition_id| directly rather than |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1574 for (int i = 0; i < max_index; i++) { | 1574 for (int i = 0; i < max_index; i++) { |
1575 // When cloning a tab, copy all entries except interstitial pages | 1575 // When cloning a tab, copy all entries except interstitial pages |
1576 if (source.entries_[i].get()->GetPageType() != | 1576 if (source.entries_[i].get()->GetPageType() != |
1577 content::PAGE_TYPE_INTERSTITIAL) { | 1577 content::PAGE_TYPE_INTERSTITIAL) { |
1578 entries_.insert(entries_.begin() + insert_index++, | 1578 entries_.insert(entries_.begin() + insert_index++, |
1579 linked_ptr<NavigationEntryImpl>( | 1579 linked_ptr<NavigationEntryImpl>( |
1580 new NavigationEntryImpl(*source.entries_[i]))); | 1580 new NavigationEntryImpl(*source.entries_[i]))); |
1581 } | 1581 } |
1582 } | 1582 } |
1583 } | 1583 } |
OLD | NEW |