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

Side by Side Diff: chrome/browser/extensions/extension_tab_util.cc

Issue 2130293003: Change OOMs to raise custom exception rather than breakpoint on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 5 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 | « base/process/memory_win.cc ('k') | chrome/common/url_constants.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/extensions/extension_tab_util.h" 5 #include "chrome/browser/extensions/extension_tab_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 552
553 bool ExtensionTabUtil::IsKillURL(const GURL& url) { 553 bool ExtensionTabUtil::IsKillURL(const GURL& url) {
554 static const char* kill_hosts[] = { 554 static const char* kill_hosts[] = {
555 chrome::kChromeUICrashHost, 555 chrome::kChromeUICrashHost,
556 chrome::kChromeUIDelayedHangUIHost, 556 chrome::kChromeUIDelayedHangUIHost,
557 chrome::kChromeUIHangUIHost, 557 chrome::kChromeUIHangUIHost,
558 chrome::kChromeUIKillHost, 558 chrome::kChromeUIKillHost,
559 chrome::kChromeUIQuitHost, 559 chrome::kChromeUIQuitHost,
560 chrome::kChromeUIRestartHost, 560 chrome::kChromeUIRestartHost,
561 content::kChromeUIBrowserCrashHost, 561 content::kChromeUIBrowserCrashHost,
562 content::kChromeUIMemoryExhaustHost,
562 }; 563 };
563 564
564 // Check a fixed-up URL, to normalize the scheme and parse hosts correctly. 565 // Check a fixed-up URL, to normalize the scheme and parse hosts correctly.
565 GURL fixed_url = 566 GURL fixed_url =
566 url_formatter::FixupURL(url.possibly_invalid_spec(), std::string()); 567 url_formatter::FixupURL(url.possibly_invalid_spec(), std::string());
567 if (!fixed_url.SchemeIs(content::kChromeUIScheme)) 568 if (!fixed_url.SchemeIs(content::kChromeUIScheme))
568 return false; 569 return false;
569 570
570 base::StringPiece fixed_host = fixed_url.host_piece(); 571 base::StringPiece fixed_host = fixed_url.host_piece();
571 for (size_t i = 0; i < arraysize(kill_hosts); ++i) { 572 for (size_t i = 0; i < arraysize(kill_hosts); ++i) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 chrome::ShowSingletonTabOverwritingNTP(browser, params); 670 chrome::ShowSingletonTabOverwritingNTP(browser, params);
670 return true; 671 return true;
671 } 672 }
672 673
673 // static 674 // static
674 bool ExtensionTabUtil::BrowserSupportsTabs(Browser* browser) { 675 bool ExtensionTabUtil::BrowserSupportsTabs(Browser* browser) {
675 return browser && browser->tab_strip_model() && !browser->is_devtools(); 676 return browser && browser->tab_strip_model() && !browser->is_devtools();
676 } 677 }
677 678
678 } // namespace extensions 679 } // namespace extensions
OLDNEW
« no previous file with comments | « base/process/memory_win.cc ('k') | chrome/common/url_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698