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

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

Issue 254763005: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address some style nits. Created 6 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/navigation_controller_impl.h" 5 #include "content/browser/frame_host/navigation_controller_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" // Temporary 10 #include "base/strings/string_number_conversions.h" // Temporary
(...skipping 20 matching lines...) Expand all
31 #include "content/public/browser/render_widget_host.h" 31 #include "content/public/browser/render_widget_host.h"
32 #include "content/public/browser/render_widget_host_view.h" 32 #include "content/public/browser/render_widget_host_view.h"
33 #include "content/public/browser/storage_partition.h" 33 #include "content/public/browser/storage_partition.h"
34 #include "content/public/browser/user_metrics.h" 34 #include "content/public/browser/user_metrics.h"
35 #include "content/public/common/content_client.h" 35 #include "content/public/common/content_client.h"
36 #include "content/public/common/content_constants.h" 36 #include "content/public/common/content_constants.h"
37 #include "content/public/common/url_constants.h" 37 #include "content/public/common/url_constants.h"
38 #include "net/base/escape.h" 38 #include "net/base/escape.h"
39 #include "net/base/mime_util.h" 39 #include "net/base/mime_util.h"
40 #include "net/base/net_util.h" 40 #include "net/base/net_util.h"
41 #include "net/base/url_constants.h"
41 #include "skia/ext/platform_canvas.h" 42 #include "skia/ext/platform_canvas.h"
42 43
43 namespace content { 44 namespace content {
44 namespace { 45 namespace {
45 46
46 const int kInvalidateAll = 0xFFFFFFFF; 47 const int kInvalidateAll = 0xFFFFFFFF;
47 48
48 // Invoked when entries have been pruned, or removed. For example, if the 49 // Invoked when entries have been pruned, or removed. For example, if the
49 // current entries are [google, digg, yahoo], with the current entry google, 50 // current entries are [google, digg, yahoo], with the current entry google,
50 // and the user types in cnet, then digg and yahoo are pruned. 51 // and the user types in cnet, then digg and yahoo are pruned.
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 if (!delegate_->GetRenderViewHost()->IsRenderViewLive() && 648 if (!delegate_->GetRenderViewHost()->IsRenderViewLive() &&
648 !IsInitialNavigation()) 649 !IsInitialNavigation())
649 return; 650 return;
650 } 651 }
651 652
652 // Checks based on params.load_type. 653 // Checks based on params.load_type.
653 switch (params.load_type) { 654 switch (params.load_type) {
654 case LOAD_TYPE_DEFAULT: 655 case LOAD_TYPE_DEFAULT:
655 break; 656 break;
656 case LOAD_TYPE_BROWSER_INITIATED_HTTP_POST: 657 case LOAD_TYPE_BROWSER_INITIATED_HTTP_POST:
657 if (!params.url.SchemeIs(kHttpScheme) && 658 if (!params.url.SchemeIs(net::kHttpScheme) &&
658 !params.url.SchemeIs(kHttpsScheme)) { 659 !params.url.SchemeIs(net::kHttpsScheme)) {
659 NOTREACHED() << "Http post load must use http(s) scheme."; 660 NOTREACHED() << "Http post load must use http(s) scheme.";
660 return; 661 return;
661 } 662 }
662 break; 663 break;
663 case LOAD_TYPE_DATA: 664 case LOAD_TYPE_DATA:
664 if (!params.url.SchemeIs(kDataScheme)) { 665 if (!params.url.SchemeIs(kDataScheme)) {
665 NOTREACHED() << "Data load must use data scheme."; 666 NOTREACHED() << "Data load must use data scheme.";
666 return; 667 return;
667 } 668 }
668 break; 669 break;
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 } 1744 }
1744 } 1745 }
1745 } 1746 }
1746 1747
1747 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 1748 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
1748 const base::Callback<base::Time()>& get_timestamp_callback) { 1749 const base::Callback<base::Time()>& get_timestamp_callback) {
1749 get_timestamp_callback_ = get_timestamp_callback; 1750 get_timestamp_callback_ = get_timestamp_callback;
1750 } 1751 }
1751 1752
1752 } // namespace content 1753 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698