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

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

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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) 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/ui/alternate_error_tab_observer.h" 5 #include "chrome/browser/ui/alternate_error_tab_observer.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/google/google_util.h" 8 #include "chrome/browser/google/google_util.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"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 registrar_.Add(this, chrome::NOTIFICATION_GOOGLE_URL_UPDATED, 36 registrar_.Add(this, chrome::NOTIFICATION_GOOGLE_URL_UPDATED,
37 content::Source<Profile>(profile_->GetOriginalProfile())); 37 content::Source<Profile>(profile_->GetOriginalProfile()));
38 } 38 }
39 39
40 AlternateErrorPageTabObserver::~AlternateErrorPageTabObserver() { 40 AlternateErrorPageTabObserver::~AlternateErrorPageTabObserver() {
41 } 41 }
42 42
43 // static 43 // static
44 void AlternateErrorPageTabObserver::RegisterUserPrefs( 44 void AlternateErrorPageTabObserver::RegisterProfilePrefs(
45 user_prefs::PrefRegistrySyncable* prefs) { 45 user_prefs::PrefRegistrySyncable* prefs) {
46 prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, 46 prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled,
47 true, 47 true,
48 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 48 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
49 } 49 }
50 50
51 //////////////////////////////////////////////////////////////////////////////// 51 ////////////////////////////////////////////////////////////////////////////////
52 // WebContentsObserver overrides 52 // WebContentsObserver overrides
53 53
54 void AlternateErrorPageTabObserver::RenderViewCreated( 54 void AlternateErrorPageTabObserver::RenderViewCreated(
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 void AlternateErrorPageTabObserver::OnAlternateErrorPagesEnabledChanged() { 89 void AlternateErrorPageTabObserver::OnAlternateErrorPagesEnabledChanged() {
90 UpdateAlternateErrorPageURL(web_contents()->GetRenderViewHost()); 90 UpdateAlternateErrorPageURL(web_contents()->GetRenderViewHost());
91 } 91 }
92 92
93 void AlternateErrorPageTabObserver::UpdateAlternateErrorPageURL( 93 void AlternateErrorPageTabObserver::UpdateAlternateErrorPageURL(
94 RenderViewHost* rvh) { 94 RenderViewHost* rvh) {
95 rvh->SetAltErrorPageURL(GetAlternateErrorPageURL()); 95 rvh->SetAltErrorPageURL(GetAlternateErrorPageURL());
96 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/alternate_error_tab_observer.h ('k') | chrome/browser/ui/ash/event_rewriter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698