Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: components/policy/core/common/schema_registry.cc

Issue 2363303002: [WIP] Proxy RtcVideoDecoder calls to a media::VideoDecoder.
Patch Set: Now working with remote ffmpeg decoder Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/policy/core/common/schema_registry.h" 5 #include "components/policy/core/common/schema_registry.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace policy { 9 namespace policy {
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 schema_map_ = new SchemaMap(map); 48 schema_map_ = new SchemaMap(map);
49 Notify(true); 49 Notify(true);
50 } 50 }
51 51
52 void SchemaRegistry::UnregisterComponent(const PolicyNamespace& ns) { 52 void SchemaRegistry::UnregisterComponent(const PolicyNamespace& ns) {
53 DomainMap map(schema_map_->GetDomains()); 53 DomainMap map(schema_map_->GetDomains());
54 if (map[ns.domain].erase(ns.component_id) != 0) { 54 if (map[ns.domain].erase(ns.component_id) != 0) {
55 schema_map_ = new SchemaMap(map); 55 schema_map_ = new SchemaMap(map);
56 Notify(false); 56 Notify(false);
57 } else { 57 } else {
58 NOTREACHED(); 58 // NOTREACHED();
59 } 59 }
60 } 60 }
61 61
62 bool SchemaRegistry::IsReady() const { 62 bool SchemaRegistry::IsReady() const {
63 for (int i = 0; i < POLICY_DOMAIN_SIZE; ++i) { 63 for (int i = 0; i < POLICY_DOMAIN_SIZE; ++i) {
64 if (!domains_ready_[i]) 64 if (!domains_ready_[i])
65 return false; 65 return false;
66 } 66 }
67 return true; 67 return true;
68 } 68 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 void ForwardingSchemaRegistry::OnSchemaRegistryShuttingDown( 223 void ForwardingSchemaRegistry::OnSchemaRegistryShuttingDown(
224 SchemaRegistry* registry) { 224 SchemaRegistry* registry) {
225 DCHECK_EQ(wrapped_, registry); 225 DCHECK_EQ(wrapped_, registry);
226 wrapped_->RemoveObserver(this); 226 wrapped_->RemoveObserver(this);
227 wrapped_->RemoveInternalObserver(this); 227 wrapped_->RemoveInternalObserver(this);
228 wrapped_ = NULL; 228 wrapped_ = NULL;
229 // Keep serving the same |schema_map_|. 229 // Keep serving the same |schema_map_|.
230 } 230 }
231 231
232 } // namespace policy 232 } // namespace policy
OLDNEW
« no previous file with comments | « chromecast/browser/cast_content_browser_client.cc ('k') | content/public/app/mojo/content_browser_manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698