OLD | NEW |
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 #ifndef CHROME_BROWSER_PREFS_COMMAND_LINE_PREF_STORE_H_ | 5 #ifndef CHROME_BROWSER_PREFS_COMMAND_LINE_PREF_STORE_H_ |
6 #define CHROME_BROWSER_PREFS_COMMAND_LINE_PREF_STORE_H_ | 6 #define CHROME_BROWSER_PREFS_COMMAND_LINE_PREF_STORE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/prefs/value_map_pref_store.h" | 10 #include "base/prefs/value_map_pref_store.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 bool ValidateProxySwitches(); | 24 bool ValidateProxySwitches(); |
25 | 25 |
26 private: | 26 private: |
27 friend class TestCommandLinePrefStore; | 27 friend class TestCommandLinePrefStore; |
28 | 28 |
29 struct StringSwitchToPreferenceMapEntry { | 29 struct StringSwitchToPreferenceMapEntry { |
30 const char* switch_name; | 30 const char* switch_name; |
31 const char* preference_path; | 31 const char* preference_path; |
32 }; | 32 }; |
33 | 33 |
| 34 struct PathSwitchToPreferenceMapEntry { |
| 35 const char* switch_name; |
| 36 const char* preference_path; |
| 37 }; |
| 38 |
34 struct IntegerSwitchToPreferenceMapEntry { | 39 struct IntegerSwitchToPreferenceMapEntry { |
35 const char* switch_name; | 40 const char* switch_name; |
36 const char* preference_path; | 41 const char* preference_path; |
37 }; | 42 }; |
38 | 43 |
39 // |set_value| indicates what the preference should be set to if the switch | 44 // |set_value| indicates what the preference should be set to if the switch |
40 // is present. | 45 // is present. |
41 struct BooleanSwitchToPreferenceMapEntry { | 46 struct BooleanSwitchToPreferenceMapEntry { |
42 const char* switch_name; | 47 const char* switch_name; |
43 const char* preference_path; | 48 const char* preference_path; |
(...skipping 12 matching lines...) Expand all Loading... |
56 | 61 |
57 // Determines whether the background mode is force-disabled. | 62 // Determines whether the background mode is force-disabled. |
58 void ApplyBackgroundModeSwitches(); | 63 void ApplyBackgroundModeSwitches(); |
59 | 64 |
60 // Weak reference. | 65 // Weak reference. |
61 const base::CommandLine* command_line_; | 66 const base::CommandLine* command_line_; |
62 | 67 |
63 // Mappings of command line switches to prefs. | 68 // Mappings of command line switches to prefs. |
64 static const BooleanSwitchToPreferenceMapEntry boolean_switch_map_[]; | 69 static const BooleanSwitchToPreferenceMapEntry boolean_switch_map_[]; |
65 static const StringSwitchToPreferenceMapEntry string_switch_map_[]; | 70 static const StringSwitchToPreferenceMapEntry string_switch_map_[]; |
| 71 static const PathSwitchToPreferenceMapEntry path_switch_map_[]; |
66 static const IntegerSwitchToPreferenceMapEntry integer_switch_map_[]; | 72 static const IntegerSwitchToPreferenceMapEntry integer_switch_map_[]; |
67 | 73 |
68 DISALLOW_COPY_AND_ASSIGN(CommandLinePrefStore); | 74 DISALLOW_COPY_AND_ASSIGN(CommandLinePrefStore); |
69 }; | 75 }; |
70 | 76 |
71 #endif // CHROME_BROWSER_PREFS_COMMAND_LINE_PREF_STORE_H_ | 77 #endif // CHROME_BROWSER_PREFS_COMMAND_LINE_PREF_STORE_H_ |
OLD | NEW |