Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / extensions / browser / api / networking_private / networking_private_delegate.cc
blob4bb57f8c845b09565dbf907992da5a9febb68890
1 // Copyright 2014 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.
5 #include "extensions/browser/api/networking_private/networking_private_delegate.h"
7 #include "extensions/browser/api/networking_private/networking_private_api.h"
9 namespace extensions {
11 NetworkingPrivateDelegate::VerifyDelegate::VerifyDelegate() {
14 NetworkingPrivateDelegate::VerifyDelegate::~VerifyDelegate() {
17 NetworkingPrivateDelegate::NetworkingPrivateDelegate(
18 scoped_ptr<VerifyDelegate> verify_delegate)
19 : verify_delegate_(verify_delegate.Pass()) {
22 NetworkingPrivateDelegate::~NetworkingPrivateDelegate() {
25 void NetworkingPrivateDelegate::AddObserver(
26 NetworkingPrivateDelegateObserver* observer) {
27 NOTREACHED() << "Class does not use NetworkingPrivateDelegateObserver";
30 void NetworkingPrivateDelegate::RemoveObserver(
31 NetworkingPrivateDelegateObserver* observer) {
32 NOTREACHED() << "Class does not use NetworkingPrivateDelegateObserver";
35 void NetworkingPrivateDelegate::StartActivate(
36 const std::string& guid,
37 const std::string& carrier,
38 const VoidCallback& success_callback,
39 const FailureCallback& failure_callback) {
40 failure_callback.Run(networking_private::kErrorNotSupported);
43 void NetworkingPrivateDelegate::VerifyDestination(
44 const VerificationProperties& verification_properties,
45 const BoolCallback& success_callback,
46 const FailureCallback& failure_callback) {
47 if (!verify_delegate_) {
48 failure_callback.Run(networking_private::kErrorNotSupported);
49 return;
51 verify_delegate_->VerifyDestination(verification_properties, success_callback,
52 failure_callback);
55 void NetworkingPrivateDelegate::VerifyAndEncryptCredentials(
56 const std::string& guid,
57 const VerificationProperties& verification_properties,
58 const StringCallback& success_callback,
59 const FailureCallback& failure_callback) {
60 if (!verify_delegate_) {
61 failure_callback.Run(networking_private::kErrorNotSupported);
62 return;
64 verify_delegate_->VerifyAndEncryptCredentials(
65 guid, verification_properties, success_callback, failure_callback);
68 void NetworkingPrivateDelegate::VerifyAndEncryptData(
69 const VerificationProperties& verification_properties,
70 const std::string& data,
71 const StringCallback& success_callback,
72 const FailureCallback& failure_callback) {
73 if (!verify_delegate_) {
74 failure_callback.Run(networking_private::kErrorNotSupported);
75 return;
77 verify_delegate_->VerifyAndEncryptData(verification_properties, data,
78 success_callback, failure_callback);
81 } // namespace extensions