OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "extensions/browser/api/vpn_provider/vpn_provider_api.h" | 5 #include "extensions/browser/api/vpn_provider/vpn_provider_api.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 VpnThreadExtensionFunction::~VpnThreadExtensionFunction() { | 157 VpnThreadExtensionFunction::~VpnThreadExtensionFunction() { |
158 } | 158 } |
159 | 159 |
160 void VpnThreadExtensionFunction::SignalCallCompletionSuccess() { | 160 void VpnThreadExtensionFunction::SignalCallCompletionSuccess() { |
161 Respond(NoArguments()); | 161 Respond(NoArguments()); |
162 } | 162 } |
163 | 163 |
164 void VpnThreadExtensionFunction::SignalCallCompletionSuccessWithId( | 164 void VpnThreadExtensionFunction::SignalCallCompletionSuccessWithId( |
165 const std::string& configuration_id) { | 165 const std::string& configuration_id) { |
166 Respond(OneArgument(base::MakeUnique<base::StringValue>(configuration_id))); | 166 Respond(OneArgument(base::MakeUnique<base::Value>(configuration_id))); |
167 } | 167 } |
168 | 168 |
169 void VpnThreadExtensionFunction::SignalCallCompletionSuccessWithWarning( | 169 void VpnThreadExtensionFunction::SignalCallCompletionSuccessWithWarning( |
170 const std::string& warning) { | 170 const std::string& warning) { |
171 if (!warning.empty()) { | 171 if (!warning.empty()) { |
172 WriteToConsole(content::CONSOLE_MESSAGE_LEVEL_WARNING, warning); | 172 WriteToConsole(content::CONSOLE_MESSAGE_LEVEL_WARNING, warning); |
173 } | 173 } |
174 Respond(NoArguments()); | 174 Respond(NoArguments()); |
175 } | 175 } |
176 | 176 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 SignalCallCompletionSuccess, | 329 SignalCallCompletionSuccess, |
330 this), | 330 this), |
331 base::Bind(&VpnProviderNotifyConnectionStateChangedFunction:: | 331 base::Bind(&VpnProviderNotifyConnectionStateChangedFunction:: |
332 SignalCallCompletionFailure, | 332 SignalCallCompletionFailure, |
333 this)); | 333 this)); |
334 | 334 |
335 return RespondLater(); | 335 return RespondLater(); |
336 } | 336 } |
337 | 337 |
338 } // namespace extensions | 338 } // namespace extensions |
OLD | NEW |