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

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

Issue 7066039: Remove dependency on PrefChangeRegistrar and renderer_preferences_util from content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // extension URL. 170 // extension URL.
171 return extension->GetResourceURL(url.path()); 171 return extension->GetResourceURL(url.path());
172 } 172 }
173 173
174 bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) { 174 bool ChromeContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) {
175 return url.spec() == chrome::kAboutKillURL || 175 return url.spec() == chrome::kAboutKillURL ||
176 url.spec() == chrome::kAboutHangURL || 176 url.spec() == chrome::kAboutHangURL ||
177 url.spec() == chrome::kAboutShorthangURL; 177 url.spec() == chrome::kAboutShorthangURL;
178 } 178 }
179 179
180 GURL ChromeContentBrowserClient::GetAlternateErrorPageURL(
181 const TabContents* tab) {
182 GURL url;
183 // Disable alternate error pages when in OffTheRecord/Incognito mode.
184 if (tab->profile()->IsOffTheRecord())
185 return url;
186
187 PrefService* prefs = tab->profile()->GetPrefs();
188 DCHECK(prefs);
189 if (prefs->GetBoolean(prefs::kAlternateErrorPagesEnabled)) {
190 url = google_util::AppendGoogleLocaleParam(
191 GURL(google_util::kLinkDoctorBaseURL));
192 url = google_util::AppendGoogleTLDParam(url);
193 }
194 return url;
195 }
196
197 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( 180 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName(
198 const std::string& alias_name) { 181 const std::string& alias_name) {
199 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); 182 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name);
200 } 183 }
201 184
202 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( 185 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
203 CommandLine* command_line, int child_process_id) { 186 CommandLine* command_line, int child_process_id) {
204 #if defined(USE_LINUX_BREAKPAD) 187 #if defined(USE_LINUX_BREAKPAD)
205 if (IsCrashReporterEnabled()) { 188 if (IsCrashReporterEnabled()) {
206 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, 189 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 338 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
356 339
357 if (process_type == switches::kGpuProcess) 340 if (process_type == switches::kGpuProcess)
358 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 341 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
359 342
360 return -1; 343 return -1;
361 } 344 }
362 #endif 345 #endif
363 346
364 } // namespace chrome 347 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698