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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 10416002: Seculative resource prefetching for URLs CL. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressing Will's comments and adding a unittest. Created 8 years, 6 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
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/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 SINGLE_VALUE_TYPE(switches::kExperimentalWallpaperUI) 755 SINGLE_VALUE_TYPE(switches::kExperimentalWallpaperUI)
756 }, 756 },
757 { 757 {
758 "enable-new-oobe", 758 "enable-new-oobe",
759 IDS_FLAGS_ENABLE_NEW_OOBE, 759 IDS_FLAGS_ENABLE_NEW_OOBE,
760 IDS_FLAGS_ENABLE_NEW_OOBE_DESCRIPTION, 760 IDS_FLAGS_ENABLE_NEW_OOBE_DESCRIPTION,
761 kOsCrOS, 761 kOsCrOS,
762 SINGLE_VALUE_TYPE(switches::kEnableNewOobe), 762 SINGLE_VALUE_TYPE(switches::kEnableNewOobe),
763 }, 763 },
764 #endif 764 #endif
765 {
766 "enable-speculative-resource-prefetching",
767 IDS_FLAGS_ENABLE_SPECULATIVE_RESOURCE_PREFETCHING_NAME,
768 IDS_FLAGS_ENABLE_SPECULATIVE_RESOURCE_PREFETCHING_DESCRIPTION,
769 kOsAll,
770 SINGLE_VALUE_TYPE(switches::kEnableSpeculativeResourcePrefetching),
771 },
765 }; 772 };
766 773
767 const Experiment* experiments = kExperiments; 774 const Experiment* experiments = kExperiments;
768 size_t num_experiments = arraysize(kExperiments); 775 size_t num_experiments = arraysize(kExperiments);
769 776
770 // Stores and encapsulates the little state that about:flags has. 777 // Stores and encapsulates the little state that about:flags has.
771 class FlagsState { 778 class FlagsState {
772 public: 779 public:
773 FlagsState() : needs_restart_(false) {} 780 FlagsState() : needs_restart_(false) {}
774 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); 781 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line);
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 } 1197 }
1191 1198
1192 const Experiment* GetExperiments(size_t* count) { 1199 const Experiment* GetExperiments(size_t* count) {
1193 *count = num_experiments; 1200 *count = num_experiments;
1194 return experiments; 1201 return experiments;
1195 } 1202 }
1196 1203
1197 } // namespace testing 1204 } // namespace testing
1198 1205
1199 } // namespace about_flags 1206 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698