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

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

Issue 2557633003: content::ReloadType cleanup: make NORMAL behave as MAIN_RESOURCE (Closed)
Patch Set: comment update Created 4 years 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/navigator_impl.h" 5 #include "content/browser/frame_host/navigator_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 namespace content { 53 namespace content {
54 54
55 namespace { 55 namespace {
56 56
57 FrameMsg_Navigate_Type::Value GetNavigationType( 57 FrameMsg_Navigate_Type::Value GetNavigationType(
58 BrowserContext* browser_context, 58 BrowserContext* browser_context,
59 const NavigationEntryImpl& entry, 59 const NavigationEntryImpl& entry,
60 ReloadType reload_type) { 60 ReloadType reload_type) {
61 switch (reload_type) { 61 switch (reload_type) {
62 case ReloadType::NORMAL: 62 case ReloadType::NORMAL:
63 return FrameMsg_Navigate_Type::RELOAD;
64 case ReloadType::MAIN_RESOURCE:
65 return FrameMsg_Navigate_Type::RELOAD_MAIN_RESOURCE; 63 return FrameMsg_Navigate_Type::RELOAD_MAIN_RESOURCE;
66 case ReloadType::BYPASSING_CACHE: 64 case ReloadType::BYPASSING_CACHE:
67 case ReloadType::DISABLE_LOFI_MODE: 65 case ReloadType::DISABLE_LOFI_MODE:
68 return FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE; 66 return FrameMsg_Navigate_Type::RELOAD_BYPASSING_CACHE;
69 case ReloadType::ORIGINAL_REQUEST_URL: 67 case ReloadType::ORIGINAL_REQUEST_URL:
70 return FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL; 68 return FrameMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL;
71 case ReloadType::NONE: 69 case ReloadType::NONE:
72 break; // Fall through to rest of function. 70 break; // Fall through to rest of function.
73 } 71 }
74 72
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 if (navigation_handle) 1269 if (navigation_handle)
1272 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID()); 1270 navigation_handle->update_entry_id_for_transfer(entry->GetUniqueID());
1273 1271
1274 controller_->SetPendingEntry(std::move(entry)); 1272 controller_->SetPendingEntry(std::move(entry));
1275 if (delegate_) 1273 if (delegate_)
1276 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL); 1274 delegate_->NotifyChangedNavigationState(content::INVALIDATE_TYPE_URL);
1277 } 1275 }
1278 } 1276 }
1279 1277
1280 } // namespace content 1278 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('k') | content/common/frame_message_enums.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698