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

Side by Side Diff: chrome/browser/prefs/incognito_mode_prefs.cc

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 years, 10 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 "chrome/browser/prefs/pref_registry_syncable.h" 10 #include "chrome/browser/prefs/pref_registry_syncable.h"
10 #include "chrome/browser/prefs/pref_service.h"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
13 13
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 #include "base/win/metro.h" 15 #include "base/win/metro.h"
16 #endif // OS_WIN 16 #endif // OS_WIN
17 17
18 // static 18 // static
19 bool IncognitoModePrefs::IntToAvailability(int in_value, 19 bool IncognitoModePrefs::IntToAvailability(int in_value,
20 Availability* out_value) { 20 Availability* out_value) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 // static 62 // static
63 bool IncognitoModePrefs::ShouldLaunchIncognito( 63 bool IncognitoModePrefs::ShouldLaunchIncognito(
64 const CommandLine& command_line, 64 const CommandLine& command_line,
65 const PrefService* prefs) { 65 const PrefService* prefs) {
66 Availability incognito_avail = GetAvailability(prefs); 66 Availability incognito_avail = GetAvailability(prefs);
67 return incognito_avail != IncognitoModePrefs::DISABLED && 67 return incognito_avail != IncognitoModePrefs::DISABLED &&
68 (command_line.HasSwitch(switches::kIncognito) || 68 (command_line.HasSwitch(switches::kIncognito) ||
69 incognito_avail == IncognitoModePrefs::FORCED); 69 incognito_avail == IncognitoModePrefs::FORCED);
70 } 70 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_factory.cc ('k') | chrome/browser/prefs/mock_pref_change_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698