| OLD | NEW |
| 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 GURL url = GURL(url_string); | 560 GURL url = GURL(url_string); |
| 561 if (!url.is_valid()) | 561 if (!url.is_valid()) |
| 562 url = extension->GetResourceURL(url_string); | 562 url = extension->GetResourceURL(url_string); |
| 563 | 563 |
| 564 return url; | 564 return url; |
| 565 } | 565 } |
| 566 | 566 |
| 567 bool ExtensionTabUtil::IsKillURL(const GURL& url) { | 567 bool ExtensionTabUtil::IsKillURL(const GURL& url) { |
| 568 static const char* kill_hosts[] = { | 568 static const char* kill_hosts[] = { |
| 569 chrome::kChromeUICrashHost, | 569 chrome::kChromeUICrashHost, |
| 570 chrome::kChromeUIDelayedHangUIHost, |
| 570 chrome::kChromeUIHangUIHost, | 571 chrome::kChromeUIHangUIHost, |
| 571 chrome::kChromeUIKillHost, | 572 chrome::kChromeUIKillHost, |
| 572 chrome::kChromeUIQuitHost, | 573 chrome::kChromeUIQuitHost, |
| 573 chrome::kChromeUIRestartHost, | 574 chrome::kChromeUIRestartHost, |
| 574 content::kChromeUIBrowserCrashHost, | 575 content::kChromeUIBrowserCrashHost, |
| 575 }; | 576 }; |
| 576 | 577 |
| 577 // Check a fixed-up URL, to normalize the scheme and parse hosts correctly. | 578 // Check a fixed-up URL, to normalize the scheme and parse hosts correctly. |
| 578 GURL fixed_url = | 579 GURL fixed_url = |
| 579 url_formatter::FixupURL(url.possibly_invalid_spec(), std::string()); | 580 url_formatter::FixupURL(url.possibly_invalid_spec(), std::string()); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 chrome::ShowSingletonTabOverwritingNTP(browser, params); | 677 chrome::ShowSingletonTabOverwritingNTP(browser, params); |
| 677 return true; | 678 return true; |
| 678 } | 679 } |
| 679 | 680 |
| 680 // static | 681 // static |
| 681 bool ExtensionTabUtil::BrowserSupportsTabs(Browser* browser) { | 682 bool ExtensionTabUtil::BrowserSupportsTabs(Browser* browser) { |
| 682 return browser && browser->tab_strip_model() && !browser->is_devtools(); | 683 return browser && browser->tab_strip_model() && !browser->is_devtools(); |
| 683 } | 684 } |
| 684 | 685 |
| 685 } // namespace extensions | 686 } // namespace extensions |
| OLD | NEW |