Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / ui / webui / downloads_util.cc
blob6a9a7cd0e5263f6fdb5eaae85668b8d474dbfb83
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))
16 return true;
18 if (cl->HasSwitch(switches::kDisableMaterialDesignDownloads))
19 return false;
21 switch (chrome::GetChannel()) {
22 case version_info::Channel::CANARY:
23 case version_info::Channel::UNKNOWN:
24 return true;
25 default:
26 return false;