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

Side by Side Diff: chrome/browser/prefs/incognito_mode_prefs.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/prefs/incognito_mode_prefs.h" 5 #include "chrome/browser/prefs/incognito_mode_prefs.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 return result; 47 return result;
48 } 48 }
49 49
50 // static 50 // static
51 void IncognitoModePrefs::SetAvailability(PrefService* prefs, 51 void IncognitoModePrefs::SetAvailability(PrefService* prefs,
52 const Availability availability) { 52 const Availability availability) {
53 prefs->SetInteger(prefs::kIncognitoModeAvailability, availability); 53 prefs->SetInteger(prefs::kIncognitoModeAvailability, availability);
54 } 54 }
55 55
56 // static 56 // static
57 void IncognitoModePrefs::RegisterUserPrefs( 57 void IncognitoModePrefs::RegisterProfilePrefs(
58 user_prefs::PrefRegistrySyncable* registry) { 58 user_prefs::PrefRegistrySyncable* registry) {
59 registry->RegisterIntegerPref( 59 registry->RegisterIntegerPref(
60 prefs::kIncognitoModeAvailability, 60 prefs::kIncognitoModeAvailability,
61 IncognitoModePrefs::ENABLED, 61 IncognitoModePrefs::ENABLED,
62 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 62 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
63 } 63 }
64 64
65 // static 65 // static
66 bool IncognitoModePrefs::ShouldLaunchIncognito( 66 bool IncognitoModePrefs::ShouldLaunchIncognito(
67 const CommandLine& command_line, 67 const CommandLine& command_line,
(...skipping 12 matching lines...) Expand all
80 case IncognitoModePrefs::DISABLED: 80 case IncognitoModePrefs::DISABLED:
81 return !profile->IsOffTheRecord(); 81 return !profile->IsOffTheRecord();
82 case IncognitoModePrefs::FORCED: 82 case IncognitoModePrefs::FORCED:
83 return profile->IsOffTheRecord(); 83 return profile->IsOffTheRecord();
84 case IncognitoModePrefs::AVAILABILITY_NUM_TYPES: 84 case IncognitoModePrefs::AVAILABILITY_NUM_TYPES:
85 NOTREACHED(); 85 NOTREACHED();
86 } 86 }
87 NOTREACHED(); 87 NOTREACHED();
88 return false; 88 return false;
89 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/incognito_mode_prefs.h ('k') | chrome/browser/prefs/incognito_mode_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698