summaryrefslogtreecommitdiffstats
path: root/ios/chrome/browser/updatable_config/updatable_dictionary.mm
diff options
context:
space:
mode:
Diffstat (limited to 'ios/chrome/browser/updatable_config/updatable_dictionary.mm')
-rw-r--r--ios/chrome/browser/updatable_config/updatable_dictionary.mm25
1 files changed, 25 insertions, 0 deletions
diff --git a/ios/chrome/browser/updatable_config/updatable_dictionary.mm b/ios/chrome/browser/updatable_config/updatable_dictionary.mm
new file mode 100644
index 0000000..602ab97
--- /dev/null
+++ b/ios/chrome/browser/updatable_config/updatable_dictionary.mm
@@ -0,0 +1,25 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/chrome/browser/updatable_config/updatable_dictionary.h"
+
+#import "base/logging.h"
+#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
+#import "ios/public/provider/chrome/browser/updatable_resource_provider.h"
+
+@implementation UpdatableDictionary
+
+- (id<UpdatableResourceBridge>)newResource:(NSString*)resourceName {
+ return ios::GetChromeBrowserProvider()
+ ->GetUpdatableResourceProvider()
+ ->CreateUpdatableResource(resourceName, nil);
+}
+
+- (NSDictionary*)dictionaryFromConfig {
+ id configData = [[[self.updatableResource resourceData] retain] autorelease];
+ DCHECK([configData isKindOfClass:[NSDictionary class]]);
+ return configData;
+}
+
+@end