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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 47513018: Make the internal storage of policy::Schemas ref counted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome-policy-schema-4-new-generate
Patch Set: Created 7 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/policy/browser_policy_connector.h" 5 #include "chrome/browser/policy/browser_policy_connector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 #if defined(OS_CHROMEOS) 404 #if defined(OS_CHROMEOS)
405 if (device_cloud_policy_manager_) 405 if (device_cloud_policy_manager_)
406 providers.push_back(device_cloud_policy_manager_.get()); 406 providers.push_back(device_cloud_policy_manager_.get());
407 #endif 407 #endif
408 std::copy(additional_providers.begin(), additional_providers.end(), 408 std::copy(additional_providers.begin(), additional_providers.end(),
409 std::back_inserter(providers)); 409 std::back_inserter(providers));
410 } 410 }
411 scoped_ptr<PolicyService> service(new PolicyServiceImpl(providers)); 411 scoped_ptr<PolicyService> service(new PolicyServiceImpl(providers));
412 scoped_refptr<PolicyDomainDescriptor> descriptor = new PolicyDomainDescriptor( 412 scoped_refptr<PolicyDomainDescriptor> descriptor = new PolicyDomainDescriptor(
413 POLICY_DOMAIN_CHROME); 413 POLICY_DOMAIN_CHROME);
414 descriptor->RegisterComponent("", SchemaOwner::Wrap(GetChromeSchemaData())); 414 descriptor->RegisterComponent("", Schema::Wrap(GetChromeSchemaData()));
415 service->RegisterPolicyDomain(descriptor); 415 service->RegisterPolicyDomain(descriptor);
416 return service.Pass(); 416 return service.Pass();
417 } 417 }
418 418
419 const ConfigurationPolicyHandlerList* 419 const ConfigurationPolicyHandlerList*
420 BrowserPolicyConnector::GetHandlerList() const { 420 BrowserPolicyConnector::GetHandlerList() const {
421 return handler_list_.get(); 421 return handler_list_.get();
422 } 422 }
423 423
424 UserAffiliation BrowserPolicyConnector::GetUserAffiliation( 424 UserAffiliation BrowserPolicyConnector::GetUserAffiliation(
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return new AsyncPolicyProvider(loader.Pass()); 576 return new AsyncPolicyProvider(loader.Pass());
577 } else { 577 } else {
578 return NULL; 578 return NULL;
579 } 579 }
580 #else 580 #else
581 return NULL; 581 return NULL;
582 #endif 582 #endif
583 } 583 }
584 584
585 } // namespace policy 585 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698