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

Side by Side Diff: components/offline_pages/offline_page_feature.cc

Issue 1772233003: Flag for Background Loading of Offline Pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/offline_pages/offline_page_feature.h" 5 #include "components/offline_pages/offline_page_feature.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return version_info::IsOfficialBuild() ? FeatureMode::DISABLED 68 return version_info::IsOfficialBuild() ? FeatureMode::DISABLED
69 : FeatureMode::ENABLED_AS_BOOKMARKS; 69 : FeatureMode::ENABLED_AS_BOOKMARKS;
70 } 70 }
71 71
72 bool IsOfflinePagesEnabled() { 72 bool IsOfflinePagesEnabled() {
73 FeatureMode mode = GetOfflinePageFeatureMode(); 73 FeatureMode mode = GetOfflinePageFeatureMode();
74 return mode == FeatureMode::ENABLED_AS_BOOKMARKS || 74 return mode == FeatureMode::ENABLED_AS_BOOKMARKS ||
75 mode == FeatureMode::ENABLED_AS_SAVED_PAGES; 75 mode == FeatureMode::ENABLED_AS_SAVED_PAGES;
76 } 76 }
77 77
78 bool IsOfflinePagesBackgroundLoadingEnabled() {;
79 return (base::CommandLine::ForCurrentProcess()->HasSwitch(
80 switches::kEnableOfflinePagesBackgroundLoading));
81 }
82
78 } // namespace offline_pages 83 } // namespace offline_pages
79 84
80 #endif 85 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698