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

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

Issue 1314793003: Enable Material Design downloads on Canary/Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « chrome/browser/ui/webui/downloads_ui_supervised_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/ui/webui/downloads_util.h" 5 #include "chrome/browser/ui/webui/downloads_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/channel_info.h" 8 #include "chrome/common/channel_info.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "components/version_info/version_info.h" 10 #include "components/version_info/version_info.h"
11 11
12 bool MdDownloadsEnabled() { 12 bool MdDownloadsEnabled() {
13 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); 13 base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
14 14
15 if (cl->HasSwitch(switches::kEnableMaterialDesignDownloads)) 15 if (cl->HasSwitch(switches::kEnableMaterialDesignDownloads))
16 return true; 16 return true;
17 17
18 if (cl->HasSwitch(switches::kDisableMaterialDesignDownloads)) 18 if (cl->HasSwitch(switches::kDisableMaterialDesignDownloads))
19 return false; 19 return false;
20 20
21 switch (chrome::GetChannel()) { 21 switch (chrome::GetChannel()) {
22 case version_info::Channel::CANARY: 22 case version_info::Channel::CANARY:
23 case version_info::Channel::UNKNOWN: 23 case version_info::Channel::UNKNOWN:
24 return false; // TODO(dbeam): return true when I update the tests. 24 return true;
25 default: 25 default:
26 return false; 26 return false;
27 } 27 }
28 } 28 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/downloads_ui_supervised_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698