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

Side by Side Diff: chrome/browser/ui/webui/downloads_util.cc

Issue 1710083005: Remove old downloads UI; Material Design version is now the default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove testing/ Created 4 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/webui/downloads_util.h"
6
7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h"
9 #include "base/strings/string_util.h"
10 #include "chrome/common/channel_info.h"
11 #include "chrome/common/chrome_switches.h"
12 #include "components/version_info/version_info.h"
13
14 const char kMaterialDesignDownloadsFinchTrialName[] = "MaterialDesignDownloads";
15
16 bool MdDownloadsEnabled() {
17 // Intentionally call this before checking command line to assign a group.
18 std::string group = base::FieldTrialList::FindFullName(
19 kMaterialDesignDownloadsFinchTrialName);
20
21 base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
22 if (cl->HasSwitch(switches::kEnableMaterialDesignDownloads))
23 return true;
24
25 if (cl->HasSwitch(switches::kDisableMaterialDesignDownloads))
26 return false;
27
28 return base::StartsWith(group, "Enabled",
29 base::CompareCase::INSENSITIVE_ASCII);
30 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/downloads_util.h ('k') | chrome/browser/ui/webui/downloads_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698