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

Side by Side Diff: chrome/browser/ui/browser_commands.cc

Issue 1846653004: Rename IGNORING_CACHE to BYPASSING_CACHE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | chrome/browser/ui/cocoa/accelerators_cocoa.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/browser_commands.h" 5 #include "chrome/browser/ui/browser_commands.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 new_tab->UserGestureDone(); 223 new_tab->UserGestureDone();
224 if (!new_tab->FocusLocationBarByDefault()) 224 if (!new_tab->FocusLocationBarByDefault())
225 new_tab->Focus(); 225 new_tab->Focus();
226 226
227 DevToolsWindow* devtools = 227 DevToolsWindow* devtools =
228 DevToolsWindow::GetInstanceForInspectedWebContents(new_tab); 228 DevToolsWindow::GetInstanceForInspectedWebContents(new_tab);
229 if (devtools && devtools->ReloadInspectedWebContents(ignore_cache)) 229 if (devtools && devtools->ReloadInspectedWebContents(ignore_cache))
230 return; 230 return;
231 231
232 if (ignore_cache) 232 if (ignore_cache)
233 new_tab->GetController().ReloadIgnoringCache(true); 233 new_tab->GetController().ReloadBypassingCache(true);
234 else 234 else
235 new_tab->GetController().Reload(true); 235 new_tab->GetController().Reload(true);
236 } 236 }
237 237
238 bool IsShowingWebContentsModalDialog(Browser* browser) { 238 bool IsShowingWebContentsModalDialog(Browser* browser) {
239 WebContents* web_contents = 239 WebContents* web_contents =
240 browser->tab_strip_model()->GetActiveWebContents(); 240 browser->tab_strip_model()->GetActiveWebContents();
241 if (!web_contents) 241 if (!web_contents)
242 return false; 242 return false;
243 243
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 return false; 419 return false;
420 controller->GoToIndex(index); 420 controller->GoToIndex(index);
421 return true; 421 return true;
422 } 422 }
423 423
424 void Reload(Browser* browser, WindowOpenDisposition disposition) { 424 void Reload(Browser* browser, WindowOpenDisposition disposition) {
425 content::RecordAction(UserMetricsAction("Reload")); 425 content::RecordAction(UserMetricsAction("Reload"));
426 ReloadInternal(browser, disposition, false); 426 ReloadInternal(browser, disposition, false);
427 } 427 }
428 428
429 void ReloadIgnoringCache(Browser* browser, WindowOpenDisposition disposition) { 429 void ReloadBypassingCache(Browser* browser, WindowOpenDisposition disposition) {
430 content::RecordAction(UserMetricsAction("ReloadIgnoringCache")); 430 content::RecordAction(UserMetricsAction("ReloadBypassingCache"));
431 ReloadInternal(browser, disposition, true); 431 ReloadInternal(browser, disposition, true);
432 } 432 }
433 433
434 bool CanReload(const Browser* browser) { 434 bool CanReload(const Browser* browser) {
435 return !browser->is_devtools(); 435 return !browser->is_devtools();
436 } 436 }
437 437
438 void Home(Browser* browser, WindowOpenDisposition disposition) { 438 void Home(Browser* browser, WindowOpenDisposition disposition) {
439 content::RecordAction(UserMetricsAction("Home")); 439 content::RecordAction(UserMetricsAction("Home"));
440 440
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 app_name, true /* trusted_source */, gfx::Rect(), browser->profile())); 1283 app_name, true /* trusted_source */, gfx::Rect(), browser->profile()));
1284 app_browser->tab_strip_model()->AppendWebContents(contents, true); 1284 app_browser->tab_strip_model()->AppendWebContents(contents, true);
1285 1285
1286 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; 1286 contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
1287 contents->GetRenderViewHost()->SyncRendererPrefs(); 1287 contents->GetRenderViewHost()->SyncRendererPrefs();
1288 app_browser->window()->Show(); 1288 app_browser->window()->Show();
1289 } 1289 }
1290 #endif // defined(ENABLE_EXTENSIONS) 1290 #endif // defined(ENABLE_EXTENSIONS)
1291 1291
1292 } // namespace chrome 1292 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | chrome/browser/ui/cocoa/accelerators_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698