Download 19/public/cpp/service_connection.cc from dejanai/chrome_models: direct link, hf CLI and curl.
- Browser
- Download file 926 Bytes
-
https://huggingface.co/dejanai/chrome_models/resolve/refs%2Fpr%2F21/19/public/cpp/service_connection.cc
- Command line
-
hf download hf://dejanai/chrome_models@refs/pr/21/19/public/cpp/service_connection.cc
-
curl -L -o service_connection.cc https://huggingface.co/dejanai/chrome_models/resolve/refs%2Fpr%2F21/19/public/cpp/service_connection.cc
926 Bytes
| // Copyright 2018 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. | |
| namespace chromeos { | |
| namespace machine_learning { | |
| namespace { | |
| static ServiceConnection* g_fake_service_connection_for_testing = nullptr; | |
| } // namespace | |
| ServiceConnection* ServiceConnection::GetInstance() { | |
| if (g_fake_service_connection_for_testing) { | |
| return g_fake_service_connection_for_testing; | |
| } | |
| // The real impl lies in service_connection_ash.cc and | |
| // service_connection_lacros.cc. | |
| return CreateRealInstance(); | |
| } | |
| void ServiceConnection::UseFakeServiceConnectionForTesting( | |
| ServiceConnection* const fake_service_connection) { | |
| g_fake_service_connection_for_testing = fake_service_connection; | |
| } | |
| } // namespace machine_learning | |
| } // namespace chromeos | |