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

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: Adjust line spacing 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/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 FeatureMode mode = GetOfflinePageFeatureMode(); 76 FeatureMode mode = GetOfflinePageFeatureMode();
77 return mode == FeatureMode::ENABLED_AS_BOOKMARKS || 77 return mode == FeatureMode::ENABLED_AS_BOOKMARKS ||
78 mode == FeatureMode::ENABLED_AS_SAVED_PAGES; 78 mode == FeatureMode::ENABLED_AS_SAVED_PAGES;
79 } 79 }
80 80
81 bool IsOffliningRecentPagesEnabled() { 81 bool IsOffliningRecentPagesEnabled() {
82 return base::FeatureList::IsEnabled(kOffliningRecentPagesFeature) && 82 return base::FeatureList::IsEnabled(kOffliningRecentPagesFeature) &&
83 IsOfflinePagesEnabled(); 83 IsOfflinePagesEnabled();
84 } 84 }
85 85
86 bool IsOfflinePagesBackgroundLoadingEnabled() {
87 return (base::CommandLine::ForCurrentProcess()->HasSwitch(
88 switches::kEnableOfflinePagesBackgroundLoading));
89 }
90
86 } // namespace offline_pages 91 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698