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

Side by Side Diff: content/browser/tab_contents/navigation_controller_impl.cc

Issue 9349010: Move handling of debug urls like chrome://crash, chrome://gpuclean to content. These are for test... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 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
OLDNEW
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"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "content/browser/browser_url_handler.h" 13 #include "content/browser/browser_url_handler.h"
14 #include "content/browser/child_process_security_policy.h" 14 #include "content/browser/child_process_security_policy.h"
15 #include "content/browser/in_process_webkit/session_storage_namespace.h" 15 #include "content/browser/in_process_webkit/session_storage_namespace.h"
16 #include "content/browser/renderer_host/render_view_host.h" // Temporary 16 #include "content/browser/renderer_host/render_view_host.h" // Temporary
17 #include "content/browser/site_instance_impl.h" 17 #include "content/browser/site_instance_impl.h"
18 #include "content/browser/tab_contents/debug_urls.h"
18 #include "content/browser/tab_contents/interstitial_page.h" 19 #include "content/browser/tab_contents/interstitial_page.h"
19 #include "content/browser/tab_contents/navigation_entry_impl.h" 20 #include "content/browser/tab_contents/navigation_entry_impl.h"
20 #include "content/browser/tab_contents/tab_contents.h" 21 #include "content/browser/tab_contents/tab_contents.h"
21 #include "content/common/view_messages.h" 22 #include "content/common/view_messages.h"
22 #include "content/public/browser/browser_context.h" 23 #include "content/public/browser/browser_context.h"
23 #include "content/public/browser/invalidate_type.h" 24 #include "content/public/browser/invalidate_type.h"
24 #include "content/public/browser/navigation_details.h" 25 #include "content/public/browser/navigation_details.h"
25 #include "content/public/browser/notification_service.h" 26 #include "content/public/browser/notification_service.h"
26 #include "content/public/browser/notification_types.h" 27 #include "content/public/browser/notification_types.h"
27 #include "content/public/browser/user_metrics.h" 28 #include "content/public/browser/user_metrics.h"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 entry->set_transferred_global_request_id(transferred_global_request_id); 559 entry->set_transferred_global_request_id(transferred_global_request_id);
559 560
560 LoadEntry(entry); 561 LoadEntry(entry);
561 } 562 }
562 563
563 void NavigationControllerImpl::LoadURL( 564 void NavigationControllerImpl::LoadURL(
564 const GURL& url, 565 const GURL& url,
565 const content::Referrer& referrer, 566 const content::Referrer& referrer,
566 content::PageTransition transition, 567 content::PageTransition transition,
567 const std::string& extra_headers) { 568 const std::string& extra_headers) {
569 if (content::HandleDebugURL(url, transition))
570 return;
571
568 // The user initiated a load, we don't need to reload anymore. 572 // The user initiated a load, we don't need to reload anymore.
569 needs_reload_ = false; 573 needs_reload_ = false;
570 574
571 NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry( 575 NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry(
572 CreateNavigationEntry( 576 CreateNavigationEntry(
573 url, referrer, transition, false, extra_headers, browser_context_)); 577 url, referrer, transition, false, extra_headers, browser_context_));
574 578
575 LoadEntry(entry); 579 LoadEntry(entry);
576 } 580 }
577 581
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 for (int i = 0; i < max_index; i++) { 1407 for (int i = 0; i < max_index; i++) {
1404 // When cloning a tab, copy all entries except interstitial pages 1408 // When cloning a tab, copy all entries except interstitial pages
1405 if (source.entries_[i].get()->GetPageType() != 1409 if (source.entries_[i].get()->GetPageType() !=
1406 content::PAGE_TYPE_INTERSTITIAL) { 1410 content::PAGE_TYPE_INTERSTITIAL) {
1407 entries_.insert(entries_.begin() + insert_index++, 1411 entries_.insert(entries_.begin() + insert_index++,
1408 linked_ptr<NavigationEntryImpl>( 1412 linked_ptr<NavigationEntryImpl>(
1409 new NavigationEntryImpl(*source.entries_[i]))); 1413 new NavigationEntryImpl(*source.entries_[i])));
1410 } 1414 }
1411 } 1415 }
1412 } 1416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698