summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.cc')
-rw-r--r--chromium/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/chromium/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.cc b/chromium/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.cc
index 577dc77a406..601eeaf2435 100644
--- a/chromium/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.cc
+++ b/chromium/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.cc
@@ -20,7 +20,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "components/prefs/pref_service.h"
-#include "components/session_manager/core/session_manager.h"
#include "content/public/browser/system_connector.h"
#include "services/device/public/mojom/constants.mojom.h"
#include "services/service_manager/public/cpp/connector.h"
@@ -57,10 +56,9 @@ std::unique_ptr<base::DictionaryValue> GetFingerprintsInfo(
} // namespace
-FingerprintHandler::FingerprintHandler(Profile* profile)
- : profile_(profile), binding_(this), session_observer_(this) {
- content::GetSystemConnector()->BindInterface(device::mojom::kServiceName,
- &fp_service_);
+FingerprintHandler::FingerprintHandler(Profile* profile) : profile_(profile) {
+ content::GetSystemConnector()->Connect(
+ device::mojom::kServiceName, fp_service_.BindNewPipeAndPassReceiver());
user_id_ = ProfileHelper::Get()->GetUserIdHashFromProfile(profile);
}
@@ -111,14 +109,12 @@ void FingerprintHandler::OnJavascriptAllowed() {
if (SessionManager::Get())
session_observer_.Add(SessionManager::Get());
- device::mojom::FingerprintObserverPtr observer;
- binding_.Bind(mojo::MakeRequest(&observer));
- fp_service_->AddFingerprintObserver(std::move(observer));
+ fp_service_->AddFingerprintObserver(receiver_.BindNewPipeAndPassRemote());
}
void FingerprintHandler::OnJavascriptDisallowed() {
session_observer_.RemoveAll();
- binding_.Close();
+ receiver_.reset();
}
void FingerprintHandler::OnRestarted() {}