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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update special_tabs.py from Nirnimesh's codereview.chromium.org/6995057/. Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 profile->GetExtensionService()->GetExtensionByWebExtent(url); 175 profile->GetExtensionService()->GetExtensionByWebExtent(url);
176 if (!extension) 176 if (!extension)
177 return url; 177 return url;
178 178
179 // If the URL is part of an extension's web extent, convert it to an 179 // If the URL is part of an extension's web extent, convert it to an
180 // extension URL. 180 // extension URL.
181 return extension->GetResourceURL(url.path()); 181 return extension->GetResourceURL(url.path());
182 } 182 }
183 183
184 bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) { 184 bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) {
185 return url.spec() == chrome::kAboutKillURL || 185 return url == GURL(chrome::kChromeUICrashURL) ||
186 url.spec() == chrome::kAboutHangURL || 186 url == GURL(chrome::kChromeUIKillURL) ||
187 url.spec() == chrome::kAboutShorthangURL; 187 url == GURL(chrome::kChromeUIHangURL) ||
188 url == GURL(chrome::kChromeUIShorthangURL);
188 } 189 }
189 190
190 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( 191 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName(
191 const std::string& alias_name) { 192 const std::string& alias_name) {
192 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); 193 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name);
193 } 194 }
194 195
195 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( 196 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
196 CommandLine* command_line, int child_process_id) { 197 CommandLine* command_line, int child_process_id) {
197 #if defined(USE_LINUX_BREAKPAD) 198 #if defined(USE_LINUX_BREAKPAD)
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 377 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
377 378
378 if (process_type == switches::kGpuProcess) 379 if (process_type == switches::kGpuProcess)
379 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 380 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
380 381
381 return -1; 382 return -1;
382 } 383 }
383 #endif 384 #endif
384 385
385 } // namespace chrome 386 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/browser_about_handler_unittest.cc ('k') | chrome/browser/crash_recovery_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698