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

Unified Diff: chrome/browser/media/router/media_route_provider_util_win.cc

Issue 1826403002: [Media Router] Moves mojo-specific code into mojo/ folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert change to media_router.mojom to fix compile Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/router/media_route_provider_util_win.cc
diff --git a/chrome/browser/media/router/media_route_provider_util_win.cc b/chrome/browser/media/router/media_route_provider_util_win.cc
deleted file mode 100644
index 1497be02d63fbaead907d666e84c9e12f7b0156e..0000000000000000000000000000000000000000
--- a/chrome/browser/media/router/media_route_provider_util_win.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/media/router/media_route_provider_util_win.h"
-
-#include "base/files/file_path.h"
-#include "base/location.h"
-#include "base/logging.h"
-#include "base/path_service.h"
-#include "chrome/installer/util/browser_distribution.h"
-#include "chrome/installer/util/firewall_manager_win.h"
-#include "content/public/browser/browser_thread.h"
-
-namespace media_router {
-
-namespace {
-
-void DoCanFirewallUseLocalPorts(const base::Callback<void(bool)>& callback) {
- DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
- base::FilePath exe_path;
- bool can_use_local_ports = false;
- if (!base::PathService::Get(base::FILE_EXE, &exe_path)) {
- LOG(WARNING) << "Couldn't get path of current executable.";
- return;
- }
- auto firewall_manager = installer::FirewallManager::Create(
- BrowserDistribution::GetDistribution(), exe_path);
- if (!firewall_manager) {
- LOG(WARNING) << "Couldn't get FirewallManager instance.";
- return;
- }
- can_use_local_ports = firewall_manager->CanUseLocalPorts();
- content::BrowserThread::PostTask(
- content::BrowserThread::UI, FROM_HERE,
- base::Bind(callback, can_use_local_ports));
-}
-
-} // namespace
-
-void CanFirewallUseLocalPorts(const base::Callback<void(bool)>& callback) {
- content::BrowserThread::PostTask(
- content::BrowserThread::FILE, FROM_HERE,
- base::Bind(&DoCanFirewallUseLocalPorts, callback));
-}
-
-} // namespace media_router
« no previous file with comments | « chrome/browser/media/router/media_route_provider_util_win.h ('k') | chrome/browser/media/router/media_router.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698