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
3 // found in the LICENSE file.
5 #import "ios/chrome/browser/updatable_config/updatable_dictionary.h"
7 #import "base/logging.h"
8 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
9 #import "ios/public/provider/chrome/browser/updatable_resource_provider.h"
11 @implementation UpdatableDictionary
13 - (id<UpdatableResourceBridge>)newResource:(NSString*)resourceName {
14 return ios::GetChromeBrowserProvider()
15 ->GetUpdatableResourceProvider()
16 ->CreateUpdatableResource(resourceName, nil);
19 - (NSDictionary*)dictionaryFromConfig {
20 id configData = [[[self.updatableResource resourceData] retain] autorelease];
21 DCHECK([configData isKindOfClass:[NSDictionary class]]);