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

Side by Side Diff: chrome/browser/prefs/command_line_pref_store.h

Issue 8572006: Add policies to control the disk cache size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed issues. Created 9 years, 1 month 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) 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 #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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 12 matching lines...) Expand all
23 // Logs a message and returns false if the proxy switches are 23 // Logs a message and returns false if the proxy switches are
24 // self-contradictory. Protected so it can be used in unit testing. 24 // self-contradictory. Protected so it can be used in unit testing.
25 bool ValidateProxySwitches(); 25 bool ValidateProxySwitches();
26 26
27 private: 27 private:
28 struct StringSwitchToPreferenceMapEntry { 28 struct StringSwitchToPreferenceMapEntry {
29 const char* switch_name; 29 const char* switch_name;
30 const char* preference_path; 30 const char* preference_path;
31 }; 31 };
32 32
33 struct IntegerSwitchToPreferenceMapEntry {
34 const char* switch_name;
35 const char* preference_path;
36 };
37
33 // |set_value| indicates what the preference should be set to if the switch 38 // |set_value| indicates what the preference should be set to if the switch
34 // is present. 39 // is present.
35 struct BooleanSwitchToPreferenceMapEntry { 40 struct BooleanSwitchToPreferenceMapEntry {
36 const char* switch_name; 41 const char* switch_name;
37 const char* preference_path; 42 const char* preference_path;
38 bool set_value; 43 bool set_value;
39 }; 44 };
40 static const BooleanSwitchToPreferenceMapEntry boolean_switch_map_[]; 45 static const BooleanSwitchToPreferenceMapEntry boolean_switch_map_[];
Joao da Silva 2011/11/16 16:10:42 Nit: please move this next to the other arrays
pastarmovj 2011/11/17 13:10:10 Done. Extra treat commented the section too :)
41 46
42 // Using the string and boolean maps, apply command-line switches to their 47 // Using the string and boolean maps, apply command-line switches to their
43 // corresponding preferences in this pref store. 48 // corresponding preferences in this pref store.
44 void ApplySimpleSwitches(); 49 void ApplySimpleSwitches();
45 50
46 // Determines the proxy mode preference from the given proxy switches. 51 // Determines the proxy mode preference from the given proxy switches.
47 void ApplyProxyMode(); 52 void ApplyProxyMode();
48 53
49 // Apply the SSL/TLS preferences from the given switches. 54 // Apply the SSL/TLS preferences from the given switches.
50 void ApplySSLSwitches(); 55 void ApplySSLSwitches();
51 56
52 // Weak reference. 57 // Weak reference.
53 const CommandLine* command_line_; 58 const CommandLine* command_line_;
54 59
55 static const StringSwitchToPreferenceMapEntry string_switch_map_[]; 60 static const StringSwitchToPreferenceMapEntry string_switch_map_[];
61 static const IntegerSwitchToPreferenceMapEntry integer_switch_map_[];
56 62
57 DISALLOW_COPY_AND_ASSIGN(CommandLinePrefStore); 63 DISALLOW_COPY_AND_ASSIGN(CommandLinePrefStore);
58 }; 64 };
59 65
60 #endif // CHROME_BROWSER_PREFS_COMMAND_LINE_PREF_STORE_H_ 66 #endif // CHROME_BROWSER_PREFS_COMMAND_LINE_PREF_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698