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

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

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 4 years, 12 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"
11 #include "build/build_config.h"
11 #include "components/offline_pages/offline_page_switches.h" 12 #include "components/offline_pages/offline_page_switches.h"
12 13
13 #if defined(OS_ANDROID) 14 #if defined(OS_ANDROID)
14 15
15 namespace offline_pages { 16 namespace offline_pages {
16 17
17 namespace { 18 namespace {
18 const char kOfflinePagesFieldTrialName[] = "OfflinePages"; 19 const char kOfflinePagesFieldTrialName[] = "OfflinePages";
19 const char kOfflinePagesFieldTrialEnabledGroupName[] = "Enabled"; 20 const char kOfflinePagesFieldTrialEnabledGroupName[] = "Enabled";
20 } // namespace 21 } // namespace
21 22
22 bool IsOfflinePagesEnabled() { 23 bool IsOfflinePagesEnabled() {
23 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 24 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
24 switches::kEnableOfflinePages)) { 25 switches::kEnableOfflinePages)) {
25 return true; 26 return true;
26 } 27 }
27 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 28 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
28 switches::kDisableOfflinePages)) { 29 switches::kDisableOfflinePages)) {
29 return false; 30 return false;
30 } 31 }
31 32
32 std::string group_name = 33 std::string group_name =
33 base::FieldTrialList::FindFullName(kOfflinePagesFieldTrialName); 34 base::FieldTrialList::FindFullName(kOfflinePagesFieldTrialName);
34 return group_name == kOfflinePagesFieldTrialEnabledGroupName; 35 return group_name == kOfflinePagesFieldTrialEnabledGroupName;
35 } 36 }
36 37
37 } // namespace offline_pages 38 } // namespace offline_pages
38 39
39 #endif 40 #endif
OLDNEW
« no previous file with comments | « components/offline_pages/offline_page_archiver.h ('k') | components/offline_pages/offline_page_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698