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_service.h" | 5 #include "extensions/browser/api/vpn_provider/vpn_service.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 const VpnService::FailureCallback& callback, | 511 const VpnService::FailureCallback& callback, |
512 const std::string& error_name, | 512 const std::string& error_name, |
513 scoped_ptr<base::DictionaryValue> error_data) { | 513 scoped_ptr<base::DictionaryValue> error_data) { |
514 callback.Run(error_name, std::string()); | 514 callback.Run(error_name, std::string()); |
515 } | 515 } |
516 | 516 |
517 void VpnService::SendSignalToExtension(const std::string& extension_id, | 517 void VpnService::SendSignalToExtension(const std::string& extension_id, |
518 const std::string& event_name, | 518 const std::string& event_name, |
519 scoped_ptr<base::ListValue> event_args) { | 519 scoped_ptr<base::ListValue> event_args) { |
520 scoped_ptr<extensions::Event> event( | 520 scoped_ptr<extensions::Event> event( |
521 new extensions::Event(event_name, event_args.Pass(), browser_context_)); | 521 new extensions::Event(extensions::events::UNKNOWN, event_name, |
| 522 event_args.Pass(), browser_context_)); |
522 | 523 |
523 event_router_->DispatchEventToExtension(extension_id, event.Pass()); | 524 event_router_->DispatchEventToExtension(extension_id, event.Pass()); |
524 } | 525 } |
525 | 526 |
526 void VpnService::SetActiveConfiguration( | 527 void VpnService::SetActiveConfiguration( |
527 VpnService::VpnConfiguration* configuration) { | 528 VpnService::VpnConfiguration* configuration) { |
528 active_configuration_ = configuration; | 529 active_configuration_ = configuration; |
529 } | 530 } |
530 | 531 |
531 VpnService::VpnConfiguration* VpnService::CreateConfigurationInternal( | 532 VpnService::VpnConfiguration* VpnService::CreateConfigurationInternal( |
(...skipping 20 matching lines...) Expand all Loading... |
552 delete configuration; | 553 delete configuration; |
553 } | 554 } |
554 | 555 |
555 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized( | 556 bool VpnService::DoesActiveConfigurationExistAndIsAccessAuthorized( |
556 const std::string& extension_id) { | 557 const std::string& extension_id) { |
557 return active_configuration_ && | 558 return active_configuration_ && |
558 active_configuration_->extension_id() == extension_id; | 559 active_configuration_->extension_id() == extension_id; |
559 } | 560 } |
560 | 561 |
561 } // namespace chromeos | 562 } // namespace chromeos |
OLD | NEW |