| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/app/breakpad_mac.h" | 8 #include "chrome/app/breakpad_mac.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/character_encoding.h" | 10 #include "chrome/browser/character_encoding.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 const Extension* extension = | 163 const Extension* extension = |
| 164 profile->GetExtensionService()->GetExtensionByWebExtent(url); | 164 profile->GetExtensionService()->GetExtensionByWebExtent(url); |
| 165 if (!extension) | 165 if (!extension) |
| 166 return url; | 166 return url; |
| 167 | 167 |
| 168 // If the URL is part of an extension's web extent, convert it to an | 168 // If the URL is part of an extension's web extent, convert it to an |
| 169 // extension URL. | 169 // extension URL. |
| 170 return extension->GetResourceURL(url.path()); | 170 return extension->GetResourceURL(url.path()); |
| 171 } | 171 } |
| 172 | 172 |
| 173 bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) { |
| 174 return url.spec() == chrome::kAboutKillURL || |
| 175 url.spec() == chrome::kAboutHangURL || |
| 176 url.spec() == chrome::kAboutShorthangURL; |
| 177 } |
| 178 |
| 173 GURL ChromeContentBrowserClient::GetAlternateErrorPageURL( | 179 GURL ChromeContentBrowserClient::GetAlternateErrorPageURL( |
| 174 const TabContents* tab) { | 180 const TabContents* tab) { |
| 175 GURL url; | 181 GURL url; |
| 176 // Disable alternate error pages when in OffTheRecord/Incognito mode. | 182 // Disable alternate error pages when in OffTheRecord/Incognito mode. |
| 177 if (tab->profile()->IsOffTheRecord()) | 183 if (tab->profile()->IsOffTheRecord()) |
| 178 return url; | 184 return url; |
| 179 | 185 |
| 180 PrefService* prefs = tab->profile()->GetPrefs(); | 186 PrefService* prefs = tab->profile()->GetPrefs(); |
| 181 DCHECK(prefs); | 187 DCHECK(prefs); |
| 182 if (prefs->GetBoolean(prefs::kAlternateErrorPagesEnabled)) { | 188 if (prefs->GetBoolean(prefs::kAlternateErrorPagesEnabled)) { |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 354 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 349 | 355 |
| 350 if (process_type == switches::kGpuProcess) | 356 if (process_type == switches::kGpuProcess) |
| 351 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); | 357 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); |
| 352 | 358 |
| 353 return -1; | 359 return -1; |
| 354 } | 360 } |
| 355 #endif | 361 #endif |
| 356 | 362 |
| 357 } // namespace chrome | 363 } // namespace chrome |
| OLD | NEW |