| OLD | NEW |
| 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/extensions/api/storage/managed_value_store_cache.h" | 5 #include "chrome/browser/extensions/api/storage/managed_value_store_cache.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 scoped_ptr<policy::PolicySchema>()); | 137 scoped_ptr<policy::PolicySchema>()); |
| 138 } else { | 138 } else { |
| 139 NOTREACHED(); | 139 NOTREACHED(); |
| 140 } | 140 } |
| 141 continue; | 141 continue; |
| 142 } | 142 } |
| 143 // The extension should have been validated, so assume the schema exists | 143 // The extension should have been validated, so assume the schema exists |
| 144 // and is valid. | 144 // and is valid. |
| 145 std::string error; | 145 std::string error; |
| 146 scoped_ptr<policy::PolicySchema> schema = | 146 scoped_ptr<policy::PolicySchema> schema = |
| 147 StorageSchemaManifestHandler::GetSchema(*it, &error); | 147 StorageSchemaManifestHandler::GetSchema(it->get(), &error); |
| 148 CHECK(schema) << error; | 148 CHECK(schema) << error; |
| 149 descriptor->RegisterComponent((*it)->id(), schema.Pass()); | 149 descriptor->RegisterComponent((*it)->id(), schema.Pass()); |
| 150 } | 150 } |
| 151 | 151 |
| 152 BrowserThread::PostTask( | 152 BrowserThread::PostTask( |
| 153 BrowserThread::UI, FROM_HERE, | 153 BrowserThread::UI, FROM_HERE, |
| 154 base::Bind(&ExtensionTracker::RegisterDomain, self, descriptor)); | 154 base::Bind(&ExtensionTracker::RegisterDomain, self, descriptor)); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void ManagedValueStoreCache::ExtensionTracker::RegisterDomain( | 157 void ManagedValueStoreCache::ExtensionTracker::RegisterDomain( |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 continuation.Run(); | 399 continuation.Run(); |
| 400 } | 400 } |
| 401 | 401 |
| 402 policy::PolicyService* ManagedValueStoreCache::GetPolicyService() { | 402 policy::PolicyService* ManagedValueStoreCache::GetPolicyService() { |
| 403 policy::ProfilePolicyConnector* connector = | 403 policy::ProfilePolicyConnector* connector = |
| 404 policy::ProfilePolicyConnectorFactory::GetForProfile(profile_); | 404 policy::ProfilePolicyConnectorFactory::GetForProfile(profile_); |
| 405 return connector->policy_service(); | 405 return connector->policy_service(); |
| 406 } | 406 } |
| 407 | 407 |
| 408 } // namespace extensions | 408 } // namespace extensions |
| OLD | NEW |