| OLD | NEW | 
|    1 // Copyright 2015 The Chromium Authors. All rights reserved. |    1 // Copyright 2015 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 "chromecast/base/device_capabilities_impl.h" |    5 #include "chromecast/base/device_capabilities_impl.h" | 
|    6  |    6  | 
|    7 #include <stddef.h> |    7 #include <stddef.h> | 
|    8  |    8  | 
|    9 #include <utility> |    9 #include <utility> | 
|   10  |   10  | 
|   11 #include "base/logging.h" |   11 #include "base/logging.h" | 
|   12 #include "base/memory/ptr_util.h" |   12 #include "base/memory/ptr_util.h" | 
|   13 #include "base/single_thread_task_runner.h" |   13 #include "base/single_thread_task_runner.h" | 
|   14 #include "base/thread_task_runner_handle.h" |   14 #include "base/threading/thread_task_runner_handle.h" | 
|   15 #include "base/values.h" |   15 #include "base/values.h" | 
|   16 #include "chromecast/base/serializers.h" |   16 #include "chromecast/base/serializers.h" | 
|   17  |   17  | 
|   18 namespace chromecast { |   18 namespace chromecast { | 
|   19  |   19  | 
|   20 namespace { |   20 namespace { | 
|   21  |   21  | 
|   22 const char kPathSeparator = '.'; |   22 const char kPathSeparator = '.'; | 
|   23  |   23  | 
|   24 // Determines if a key passed to Register() is valid. No path separators can |   24 // Determines if a key passed to Register() is valid. No path separators can | 
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  318   } |  318   } | 
|  319  |  319  | 
|  320   // Even though ObserverListThreadSafe notifications are always asynchronous |  320   // Even though ObserverListThreadSafe notifications are always asynchronous | 
|  321   // (posts task even if to same thread), no locks should be held at this point |  321   // (posts task even if to same thread), no locks should be held at this point | 
|  322   // in the code. This is just to be safe that no deadlocks occur if Observers |  322   // in the code. This is just to be safe that no deadlocks occur if Observers | 
|  323   // call DeviceCapabilities methods in OnCapabilitiesChanged(). |  323   // call DeviceCapabilities methods in OnCapabilitiesChanged(). | 
|  324   observer_list_->Notify(FROM_HERE, &Observer::OnCapabilitiesChanged, path); |  324   observer_list_->Notify(FROM_HERE, &Observer::OnCapabilitiesChanged, path); | 
|  325 } |  325 } | 
|  326  |  326  | 
|  327 }  // namespace chromecast |  327 }  // namespace chromecast | 
| OLD | NEW |