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 /* | 5 /* |
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * | 10 * |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 #include "content/public/browser/invalidate_type.h" | 67 #include "content/public/browser/invalidate_type.h" |
68 #include "content/public/browser/navigation_details.h" | 68 #include "content/public/browser/navigation_details.h" |
69 #include "content/public/browser/notification_service.h" | 69 #include "content/public/browser/notification_service.h" |
70 #include "content/public/browser/notification_types.h" | 70 #include "content/public/browser/notification_types.h" |
71 #include "content/public/browser/render_widget_host.h" | 71 #include "content/public/browser/render_widget_host.h" |
72 #include "content/public/browser/render_widget_host_view.h" | 72 #include "content/public/browser/render_widget_host_view.h" |
73 #include "content/public/browser/storage_partition.h" | 73 #include "content/public/browser/storage_partition.h" |
74 #include "content/public/browser/user_metrics.h" | 74 #include "content/public/browser/user_metrics.h" |
75 #include "content/public/common/content_client.h" | 75 #include "content/public/common/content_client.h" |
76 #include "content/public/common/content_constants.h" | 76 #include "content/public/common/content_constants.h" |
| 77 #include "content/public/common/content_switches.h" |
77 #include "media/base/mime_util.h" | 78 #include "media/base/mime_util.h" |
78 #include "net/base/escape.h" | 79 #include "net/base/escape.h" |
79 #include "net/base/net_util.h" | 80 #include "net/base/net_util.h" |
80 #include "skia/ext/platform_canvas.h" | 81 #include "skia/ext/platform_canvas.h" |
81 #include "url/url_constants.h" | 82 #include "url/url_constants.h" |
82 | 83 |
83 namespace content { | 84 namespace content { |
84 namespace { | 85 namespace { |
85 | 86 |
86 // Invoked when entries have been pruned, or removed. For example, if the | 87 // Invoked when entries have been pruned, or removed. For example, if the |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 // cleared out safely. | 284 // cleared out safely. |
284 entries->clear(); | 285 entries->clear(); |
285 | 286 |
286 // And finish the restore. | 287 // And finish the restore. |
287 FinishRestore(selected_navigation, type); | 288 FinishRestore(selected_navigation, type); |
288 } | 289 } |
289 | 290 |
290 void NavigationControllerImpl::Reload(bool check_for_repost) { | 291 void NavigationControllerImpl::Reload(bool check_for_repost) { |
291 ReloadInternal(check_for_repost, RELOAD); | 292 ReloadInternal(check_for_repost, RELOAD); |
292 } | 293 } |
| 294 void NavigationControllerImpl::ReloadToRefreshContent(bool check_for_repost) { |
| 295 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 296 switches::kEnableNonValidatingReloadOnRefreshContent)) { |
| 297 ReloadInternal(check_for_repost, NO_RELOAD); |
| 298 } else { |
| 299 ReloadInternal(check_for_repost, RELOAD); |
| 300 } |
| 301 } |
293 void NavigationControllerImpl::ReloadIgnoringCache(bool check_for_repost) { | 302 void NavigationControllerImpl::ReloadIgnoringCache(bool check_for_repost) { |
294 ReloadInternal(check_for_repost, RELOAD_IGNORING_CACHE); | 303 ReloadInternal(check_for_repost, RELOAD_IGNORING_CACHE); |
295 } | 304 } |
296 void NavigationControllerImpl::ReloadOriginalRequestURL(bool check_for_repost) { | 305 void NavigationControllerImpl::ReloadOriginalRequestURL(bool check_for_repost) { |
297 ReloadInternal(check_for_repost, RELOAD_ORIGINAL_REQUEST_URL); | 306 ReloadInternal(check_for_repost, RELOAD_ORIGINAL_REQUEST_URL); |
298 } | 307 } |
299 void NavigationControllerImpl::ReloadDisableLoFi(bool check_for_repost) { | 308 void NavigationControllerImpl::ReloadDisableLoFi(bool check_for_repost) { |
300 ReloadInternal(check_for_repost, RELOAD_DISABLE_LOFI_MODE); | 309 ReloadInternal(check_for_repost, RELOAD_DISABLE_LOFI_MODE); |
301 } | 310 } |
302 | 311 |
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 } | 2041 } |
2033 } | 2042 } |
2034 } | 2043 } |
2035 | 2044 |
2036 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 2045 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
2037 const base::Callback<base::Time()>& get_timestamp_callback) { | 2046 const base::Callback<base::Time()>& get_timestamp_callback) { |
2038 get_timestamp_callback_ = get_timestamp_callback; | 2047 get_timestamp_callback_ = get_timestamp_callback; |
2039 } | 2048 } |
2040 | 2049 |
2041 } // namespace content | 2050 } // namespace content |
OLD | NEW |