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

Side by Side Diff: chrome/browser/tab_contents/navigation_controller.cc

Issue 28209: Back out r10487 too (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « chrome/browser/site_instance_unittest.cc ('k') | chrome/browser/tab_contents/site_instance.cc » ('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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/tab_contents/navigation_controller.h" 5 #include "chrome/browser/tab_contents/navigation_controller.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_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 entries_.erase(entries_.begin() + index); 379 entries_.erase(entries_.begin() + index);
380 380
381 if (last_committed_entry_index_ == index) { 381 if (last_committed_entry_index_ == index) {
382 last_committed_entry_index_--; 382 last_committed_entry_index_--;
383 // We removed the currently shown entry, so we have to load something else. 383 // We removed the currently shown entry, so we have to load something else.
384 if (last_committed_entry_index_ != -1) { 384 if (last_committed_entry_index_ != -1) {
385 pending_entry_index_ = last_committed_entry_index_; 385 pending_entry_index_ = last_committed_entry_index_;
386 NavigateToPendingEntry(false); 386 NavigateToPendingEntry(false);
387 } else { 387 } else {
388 // If there is nothing to show, show a default page. 388 // If there is nothing to show, show a default page.
389 LoadURL(default_url.is_empty() ? GURL(chrome::kAboutBlankURL) : 389 LoadURL(default_url.is_empty() ? GURL("about:blank") : default_url,
390 default_url,
391 GURL(), PageTransition::START_PAGE); 390 GURL(), PageTransition::START_PAGE);
392 } 391 }
393 } else if (last_committed_entry_index_ > index) { 392 } else if (last_committed_entry_index_ > index) {
394 last_committed_entry_index_--; 393 last_committed_entry_index_--;
395 } 394 }
396 } 395 }
397 396
398 void NavigationController::Destroy() { 397 void NavigationController::Destroy() {
399 // Close all tab contents owned by this controller. We make a list on the 398 // Close all tab contents owned by this controller. We make a list on the
400 // stack because they are removed from the map as they are Destroyed 399 // stack because they are removed from the map as they are Destroyed
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 return i; 1225 return i;
1227 } 1226 }
1228 return -1; 1227 return -1;
1229 } 1228 }
1230 1229
1231 NavigationEntry* NavigationController::GetTransientEntry() const { 1230 NavigationEntry* NavigationController::GetTransientEntry() const {
1232 if (transient_entry_index_ == -1) 1231 if (transient_entry_index_ == -1)
1233 return NULL; 1232 return NULL;
1234 return entries_[transient_entry_index_].get(); 1233 return entries_[transient_entry_index_].get();
1235 } 1234 }
OLDNEW
« no previous file with comments | « chrome/browser/site_instance_unittest.cc ('k') | chrome/browser/tab_contents/site_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698