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

Side by Side Diff: chrome/browser/download/trusted_sources_manager.cc

Issue 2943763002: Add a new group policy to disable safe browsing for files downloaded from trusted sources. (Closed)
Patch Set: Fix an XML goof Created 3 years, 5 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 (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() = default;
18
19 bool TrustedSourcesManager::IsFromTrustedSource(const GURL& url) const {
20 return rules_.Matches(url);
21 }
OLDNEW
« no previous file with comments | « chrome/browser/download/trusted_sources_manager.h ('k') | chrome/browser/download/trusted_sources_manager_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698