Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2017 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/download/trusted_sources_manager.h" | |
| 6 | |
| 7 #include "base/command_line.h" | |
| 8 #include "chrome/common/chrome_switches.h" | |
| 9 | |
| 10 TrustedSourcesManager::TrustedSourcesManager() { | |
| 11 base::CommandLine* command_line(base::CommandLine::ForCurrentProcess()); | |
| 12 DCHECK(command_line); | |
| 13 rules_.ParseFromString( | |
| 14 command_line->GetSwitchValueASCII(switches::kTrustedDownloadSources)); | |
| 15 } | |
| 16 | |
| 17 TrustedSourcesManager::~TrustedSourcesManager() {} | |
|
David Trainor- moved to gerrit
2017/06/23 07:32:47
= default
MAD
2017/06/29 14:44:53
Done.
| |
| 18 | |
| 19 bool TrustedSourcesManager::IsFromTrustedSource(const GURL& url) const { | |
| 20 return rules_.Matches(url); | |
| 21 } | |
| OLD | NEW |