 Chromium Code Reviews
 Chromium Code Reviews Issue 2726843006:
  ShapeDetection: add support for Text Detection in Mac  (Closed)
    
  
    Issue 2726843006:
  ShapeDetection: add support for Text Detection in Mac  (Closed) 
  | 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 "services/service_manager/service_manager.h" | 5 #include "services/service_manager/service_manager.h" | 
| 6 | 6 | 
| 7 #include <stdint.h> | 7 #include <stdint.h> | 
| 8 | 8 | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 | 10 | 
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 Instance* source = | 192 Instance* source = | 
| 193 service_manager_->GetExistingInstance(params->source()); | 193 service_manager_->GetExistingInstance(params->source()); | 
| 194 if (source) { | 194 if (source) { | 
| 195 source_specs = source->interface_provider_specs_; | 195 source_specs = source->interface_provider_specs_; | 
| 196 source_connection_spec = source->GetConnectionSpec(); | 196 source_connection_spec = source->GetConnectionSpec(); | 
| 197 } | 197 } | 
| 198 | 198 | 
| 199 InterfaceSet exposed = GetInterfacesToExpose(source_connection_spec, | 199 InterfaceSet exposed = GetInterfacesToExpose(source_connection_spec, | 
| 200 identity_, | 200 identity_, | 
| 201 GetConnectionSpec()); | 201 GetConnectionSpec()); | 
| 202 bool allowed = (exposed.size() == 1 && exposed.count("*") == 1) || | 202 const bool allowed = (exposed.size() == 1 && exposed.count("*") == 1) || | 
| 
Reilly Grant (use Gerrit)
2017/03/02 22:10:26
This seems like an unrelated and unnecessary chang
 
mcasas
2017/03/02 23:27:50
Done.
 | |
| 203 exposed.count(params->interface_name()) > 0; | 203 exposed.count(params->interface_name()) > 0; | 
| 204 if (!allowed) { | 204 if (!allowed) { | 
| 205 std::stringstream ss; | 205 std::stringstream ss; | 
| 206 ss << "Connection InterfaceProviderSpec prevented service: " | 206 ss << "Connection InterfaceProviderSpec prevented service: " | 
| 207 << params->source().name() << " from binding interface: " | 207 << params->source().name() << " from binding interface: " | 
| 208 << params->interface_name() << " exposed by: " << identity_.name(); | 208 << params->interface_name() << " exposed by: " << identity_.name(); | 
| 209 LOG(ERROR) << ss.str(); | 209 LOG(ERROR) << ss.str(); | 
| 210 params->bind_interface_callback().Run(mojom::ConnectResult::ACCESS_DENIED, | 210 params->bind_interface_callback().Run(mojom::ConnectResult::ACCESS_DENIED, | 
| 211 identity_.user_id()); | 211 identity_.user_id()); | 
| 212 return false; | 212 return false; | 
| 213 } | 213 } | 
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1063 bool connected = instance->CallOnConnect(¶ms); | 1063 bool connected = instance->CallOnConnect(¶ms); | 
| 1064 DCHECK(connected); | 1064 DCHECK(connected); | 
| 1065 } | 1065 } | 
| 1066 } | 1066 } | 
| 1067 | 1067 | 
| 1068 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() { | 1068 base::WeakPtr<ServiceManager> ServiceManager::GetWeakPtr() { | 
| 1069 return weak_ptr_factory_.GetWeakPtr(); | 1069 return weak_ptr_factory_.GetWeakPtr(); | 
| 1070 } | 1070 } | 
| 1071 | 1071 | 
| 1072 } // namespace service_manager | 1072 } // namespace service_manager | 
| OLD | NEW |