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