OLD | NEW |
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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "content/public/browser/invalidate_type.h" | 30 #include "content/public/browser/invalidate_type.h" |
31 #include "content/public/browser/navigation_details.h" | 31 #include "content/public/browser/navigation_details.h" |
32 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
33 #include "content/public/browser/notification_types.h" | 33 #include "content/public/browser/notification_types.h" |
34 #include "content/public/browser/render_widget_host.h" | 34 #include "content/public/browser/render_widget_host.h" |
35 #include "content/public/browser/render_widget_host_view.h" | 35 #include "content/public/browser/render_widget_host_view.h" |
36 #include "content/public/browser/storage_partition.h" | 36 #include "content/public/browser/storage_partition.h" |
37 #include "content/public/browser/user_metrics.h" | 37 #include "content/public/browser/user_metrics.h" |
38 #include "content/public/common/content_client.h" | 38 #include "content/public/common/content_client.h" |
39 #include "content/public/common/content_constants.h" | 39 #include "content/public/common/content_constants.h" |
40 #include "content/public/common/url_constants.h" | |
41 #include "net/base/escape.h" | 40 #include "net/base/escape.h" |
42 #include "net/base/mime_util.h" | 41 #include "net/base/mime_util.h" |
43 #include "net/base/net_util.h" | 42 #include "net/base/net_util.h" |
44 #include "skia/ext/platform_canvas.h" | 43 #include "skia/ext/platform_canvas.h" |
| 44 #include "url/url_constants.h" |
45 | 45 |
46 namespace content { | 46 namespace content { |
47 namespace { | 47 namespace { |
48 | 48 |
49 const int kInvalidateAll = 0xFFFFFFFF; | 49 const int kInvalidateAll = 0xFFFFFFFF; |
50 | 50 |
51 // Invoked when entries have been pruned, or removed. For example, if the | 51 // Invoked when entries have been pruned, or removed. For example, if the |
52 // current entries are [google, digg, yahoo], with the current entry google, | 52 // current entries are [google, digg, yahoo], with the current entry google, |
53 // and the user types in cnet, then digg and yahoo are pruned. | 53 // and the user types in cnet, then digg and yahoo are pruned. |
54 void NotifyPrunedEntries(NavigationControllerImpl* nav_controller, | 54 void NotifyPrunedEntries(NavigationControllerImpl* nav_controller, |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 case LOAD_TYPE_DEFAULT: | 657 case LOAD_TYPE_DEFAULT: |
658 break; | 658 break; |
659 case LOAD_TYPE_BROWSER_INITIATED_HTTP_POST: | 659 case LOAD_TYPE_BROWSER_INITIATED_HTTP_POST: |
660 if (!params.url.SchemeIs(url::kHttpScheme) && | 660 if (!params.url.SchemeIs(url::kHttpScheme) && |
661 !params.url.SchemeIs(url::kHttpsScheme)) { | 661 !params.url.SchemeIs(url::kHttpsScheme)) { |
662 NOTREACHED() << "Http post load must use http(s) scheme."; | 662 NOTREACHED() << "Http post load must use http(s) scheme."; |
663 return; | 663 return; |
664 } | 664 } |
665 break; | 665 break; |
666 case LOAD_TYPE_DATA: | 666 case LOAD_TYPE_DATA: |
667 if (!params.url.SchemeIs(kDataScheme)) { | 667 if (!params.url.SchemeIs(url::kDataScheme)) { |
668 NOTREACHED() << "Data load must use data scheme."; | 668 NOTREACHED() << "Data load must use data scheme."; |
669 return; | 669 return; |
670 } | 670 } |
671 break; | 671 break; |
672 default: | 672 default: |
673 NOTREACHED(); | 673 NOTREACHED(); |
674 break; | 674 break; |
675 }; | 675 }; |
676 | 676 |
677 // The user initiated a load, we don't need to reload anymore. | 677 // The user initiated a load, we don't need to reload anymore. |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1761 } | 1761 } |
1762 } | 1762 } |
1763 } | 1763 } |
1764 | 1764 |
1765 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1765 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
1766 const base::Callback<base::Time()>& get_timestamp_callback) { | 1766 const base::Callback<base::Time()>& get_timestamp_callback) { |
1767 get_timestamp_callback_ = get_timestamp_callback; | 1767 get_timestamp_callback_ = get_timestamp_callback; |
1768 } | 1768 } |
1769 | 1769 |
1770 } // namespace content | 1770 } // namespace content |
OLD | NEW |