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

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: remove unused func 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
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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 543
544 return url; 544 return url;
545 } 545 }
546 546
547 bool ExtensionTabUtil::IsKillURL(const GURL& url) { 547 bool ExtensionTabUtil::IsKillURL(const GURL& url) {
548 static const char* kill_hosts[] = { 548 static const char* kill_hosts[] = {
549 chrome::kChromeUICrashHost, 549 chrome::kChromeUICrashHost,
550 chrome::kChromeUIDelayedHangUIHost, 550 chrome::kChromeUIDelayedHangUIHost,
551 chrome::kChromeUIHangUIHost, 551 chrome::kChromeUIHangUIHost,
552 chrome::kChromeUIKillHost, 552 chrome::kChromeUIKillHost,
553 chrome::kChromeUIMemoryExhaustHost,
553 chrome::kChromeUIQuitHost, 554 chrome::kChromeUIQuitHost,
554 chrome::kChromeUIRestartHost, 555 chrome::kChromeUIRestartHost,
555 content::kChromeUIBrowserCrashHost, 556 content::kChromeUIBrowserCrashHost,
556 }; 557 };
557 558
558 // Check a fixed-up URL, to normalize the scheme and parse hosts correctly. 559 // Check a fixed-up URL, to normalize the scheme and parse hosts correctly.
559 GURL fixed_url = 560 GURL fixed_url =
560 url_formatter::FixupURL(url.possibly_invalid_spec(), std::string()); 561 url_formatter::FixupURL(url.possibly_invalid_spec(), std::string());
561 if (!fixed_url.SchemeIs(content::kChromeUIScheme)) 562 if (!fixed_url.SchemeIs(content::kChromeUIScheme))
562 return false; 563 return false;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 chrome::ShowSingletonTabOverwritingNTP(browser, params); 664 chrome::ShowSingletonTabOverwritingNTP(browser, params);
664 return true; 665 return true;
665 } 666 }
666 667
667 // static 668 // static
668 bool ExtensionTabUtil::BrowserSupportsTabs(Browser* browser) { 669 bool ExtensionTabUtil::BrowserSupportsTabs(Browser* browser) {
669 return browser && browser->tab_strip_model() && !browser->is_devtools(); 670 return browser && browser->tab_strip_model() && !browser->is_devtools();
670 } 671 }
671 672
672 } // namespace extensions 673 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698