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

Side by Side Diff: chrome/browser/ui/alternate_error_tab_observer.cc

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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
« no previous file with comments | « chrome/browser/ui/alternate_error_tab_observer.h ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/alternate_error_tab_observer.h" 5 #include "chrome/browser/ui/alternate_error_tab_observer.h"
6 6
7 #include "chrome/browser/google/google_util.h" 7 #include "chrome/browser/google/google_util.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
11 #include "chrome/common/pref_names.h" 11 #include "chrome/common/pref_names.h"
12 #include "content/public/browser/notification_service.h" 12 #include "content/public/browser/notification_service.h"
13 #include "content/public/browser/render_view_host.h" 13 #include "content/public/browser/render_view_host.h"
14 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
15 15
16 using content::RenderViewHost;
16 using content::WebContents; 17 using content::WebContents;
17 18
18 AlternateErrorPageTabObserver::AlternateErrorPageTabObserver( 19 AlternateErrorPageTabObserver::AlternateErrorPageTabObserver(
19 WebContents* web_contents) 20 WebContents* web_contents)
20 : content::WebContentsObserver(web_contents) { 21 : content::WebContentsObserver(web_contents) {
21 PrefService* prefs = GetProfile()->GetPrefs(); 22 PrefService* prefs = GetProfile()->GetPrefs();
22 if (prefs) { 23 if (prefs) {
23 pref_change_registrar_.Init(prefs); 24 pref_change_registrar_.Init(prefs);
24 pref_change_registrar_.Add(prefs::kAlternateErrorPagesEnabled, this); 25 pref_change_registrar_.Add(prefs::kAlternateErrorPagesEnabled, this);
25 } 26 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 GURL(google_util::kLinkDoctorBaseURL)); 92 GURL(google_util::kLinkDoctorBaseURL));
92 url = google_util::AppendGoogleTLDParam(url); 93 url = google_util::AppendGoogleTLDParam(url);
93 } 94 }
94 return url; 95 return url;
95 } 96 }
96 97
97 void AlternateErrorPageTabObserver::UpdateAlternateErrorPageURL( 98 void AlternateErrorPageTabObserver::UpdateAlternateErrorPageURL(
98 RenderViewHost* rvh) { 99 RenderViewHost* rvh) {
99 rvh->SetAltErrorPageURL(GetAlternateErrorPageURL()); 100 rvh->SetAltErrorPageURL(GetAlternateErrorPageURL());
100 } 101 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/alternate_error_tab_observer.h ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698