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

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

Issue 28170: More URL constants replacement. (Closed) Base URL: svn://chrome-svn/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 | Annotate | Revision Log
« 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("about:blank") : default_url, 389 LoadURL(default_url.is_empty() ? GURL(chrome::kAboutBlankURL) :
390 default_url,
390 GURL(), PageTransition::START_PAGE); 391 GURL(), PageTransition::START_PAGE);
391 } 392 }
392 } else if (last_committed_entry_index_ > index) { 393 } else if (last_committed_entry_index_ > index) {
393 last_committed_entry_index_--; 394 last_committed_entry_index_--;
394 } 395 }
395 } 396 }
396 397
397 void NavigationController::Destroy() { 398 void NavigationController::Destroy() {
398 // Close all tab contents owned by this controller. We make a list on the 399 // Close all tab contents owned by this controller. We make a list on the
399 // stack because they are removed from the map as they are Destroyed 400 // stack because they are removed from the map as they are Destroyed
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 return i; 1226 return i;
1226 } 1227 }
1227 return -1; 1228 return -1;
1228 } 1229 }
1229 1230
1230 NavigationEntry* NavigationController::GetTransientEntry() const { 1231 NavigationEntry* NavigationController::GetTransientEntry() const {
1231 if (transient_entry_index_ == -1) 1232 if (transient_entry_index_ == -1)
1232 return NULL; 1233 return NULL;
1233 return entries_[transient_entry_index_].get(); 1234 return entries_[transient_entry_index_].get();
1234 } 1235 }
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