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

Side by Side Diff: chrome/browser/extensions/api/storage/managed_value_store_cache.cc

Issue 2871303004: Rename TaskRunner::RunsTasksOnCurrentThread() in //chrome (Closed)
Patch Set: fixed build error Created 3 years, 7 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 (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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 bool ManagedValueStoreCache::ExtensionTracker::UsesManagedStorage( 184 bool ManagedValueStoreCache::ExtensionTracker::UsesManagedStorage(
185 const Extension* extension) const { 185 const Extension* extension) const {
186 return extension->manifest()->HasPath(manifest_keys::kStorageManagedSchema); 186 return extension->manifest()->HasPath(manifest_keys::kStorageManagedSchema);
187 } 187 }
188 188
189 // static 189 // static
190 void ManagedValueStoreCache::ExtensionTracker::LoadSchemasOnBlockingPool( 190 void ManagedValueStoreCache::ExtensionTracker::LoadSchemasOnBlockingPool(
191 std::unique_ptr<ExtensionSet> extensions, 191 std::unique_ptr<ExtensionSet> extensions,
192 base::WeakPtr<ExtensionTracker> self) { 192 base::WeakPtr<ExtensionTracker> self) {
193 DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); 193 base::ThreadRestrictions::AssertIOAllowed();
194 std::unique_ptr<policy::ComponentMap> components(new policy::ComponentMap); 194 std::unique_ptr<policy::ComponentMap> components(new policy::ComponentMap);
195 195
196 for (ExtensionSet::const_iterator it = extensions->begin(); 196 for (ExtensionSet::const_iterator it = extensions->begin();
197 it != extensions->end(); ++it) { 197 it != extensions->end(); ++it) {
198 std::string schema_file; 198 std::string schema_file;
199 if (!(*it)->manifest()->GetString( 199 if (!(*it)->manifest()->GetString(
200 manifest_keys::kStorageManagedSchema, &schema_file)) { 200 manifest_keys::kStorageManagedSchema, &schema_file)) {
201 // TODO(joaodasilva): Remove this. http://crbug.com/325349 201 // TODO(joaodasilva): Remove this. http://crbug.com/325349
202 (*components)[(*it)->id()] = policy::Schema(); 202 (*components)[(*it)->id()] = policy::Schema();
203 continue; 203 continue;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 return raw_store; 380 return raw_store;
381 } 381 }
382 382
383 bool ManagedValueStoreCache::HasStore(const std::string& extension_id) const { 383 bool ManagedValueStoreCache::HasStore(const std::string& extension_id) const {
384 // Note: Currently only manage extensions (not apps). 384 // Note: Currently only manage extensions (not apps).
385 return storage_factory_->HasSettings(settings_namespace::MANAGED, 385 return storage_factory_->HasSettings(settings_namespace::MANAGED,
386 kManagedModelType, extension_id); 386 kManagedModelType, extension_id);
387 } 387 }
388 388
389 } // namespace extensions 389 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/download/download_commands.cc ('k') | chrome/browser/extensions/app_data_migrator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698