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.
5 #include "chrome/browser/ui/webui/downloads_util.h"
7 #include "base/command_line.h"
8 #include "chrome/common/channel_info.h"
9 #include "chrome/common/chrome_switches.h"
10 #include "components/version_info/version_info.h"
12 bool MdDownloadsEnabled() {
13 base::CommandLine
* cl
= base::CommandLine::ForCurrentProcess();
15 if (cl
->HasSwitch(switches::kEnableMaterialDesignDownloads
))
18 if (cl
->HasSwitch(switches::kDisableMaterialDesignDownloads
))
21 switch (chrome::GetChannel()) {
22 case version_info::Channel::CANARY
:
23 case version_info::Channel::UNKNOWN
: