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

Unified Diff: ios/public/test/test_updatable_resource_provider.mm

Issue 1663783002: Remove the //ios/public/test target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ios_tests
Patch Set: Add missing forwarding-header Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/public/test/test_updatable_resource_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/public/test/test_updatable_resource_provider.mm
diff --git a/ios/public/test/test_updatable_resource_provider.mm b/ios/public/test/test_updatable_resource_provider.mm
deleted file mode 100644
index 177f17bd390e0db7b2cdb389de92eae6ac2b445d..0000000000000000000000000000000000000000
--- a/ios/public/test/test_updatable_resource_provider.mm
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright 2015 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/public/test/test_updatable_resource_provider.h"
-
-#include "base/logging.h"
-#include "base/mac/scoped_nsobject.h"
-
-#pragma mark - TestUpdatabeResourceDescriptor
-
-// Dummy UpdatableResourceDescriptorBridge implementation.
-@interface TestUpdatabeResourceDescriptor
- : NSObject<UpdatableResourceDescriptorBridge>
-@property(nonatomic, readonly) NSURL* updateURL;
-@property(nonatomic, copy) NSString* applicationIdentifier;
-@property(nonatomic, copy) NSString* applicationVersion;
-@property(nonatomic, copy) NSString* bundleResourcePath;
-@property(nonatomic, copy) NSString* updateResourcePath;
-@end
-
-@implementation TestUpdatabeResourceDescriptor
-@synthesize updateURL;
-@synthesize applicationIdentifier;
-@synthesize applicationVersion;
-@synthesize bundleResourcePath;
-@synthesize updateResourcePath;
-
-- (void)updateCheckDidFinishWithSuccess:(BOOL)wasSuccessful {
-}
-
-- (NSString*)resourcePath {
- return nil;
-}
-@end
-
-#pragma mark - TestUpdatableResource
-
-// Dummy UpdatableResourceDescriptorBridge implementation that simply loads data
-// from the specified plist file.
-@interface TestUpdatableResource : NSObject<UpdatableResourceBridge>
-@property(nonatomic, readonly) id<UpdatableResourceDescriptorBridge> descriptor;
-- (instancetype)initWithDelegate:(id<UpdatableResourceDelegate>)delegate
- plist:(NSString*)resource_identifier
- NS_DESIGNATED_INITIALIZER;
-- (instancetype)init NS_UNAVAILABLE;
-@end
-
-@implementation TestUpdatableResource {
- base::scoped_nsprotocol<id<UpdatableResourceDelegate>> _delegate;
- base::scoped_nsprotocol<id<UpdatableResourceDescriptorBridge>> _descriptor;
-}
-
-- (instancetype)initWithDelegate:(id<UpdatableResourceDelegate>)delegate
- plist:(NSString*)resourceIdentifier {
- if (self = [super init]) {
- _delegate.reset([delegate retain]);
- _descriptor.reset([[TestUpdatabeResourceDescriptor alloc] init]);
- DCHECK([resourceIdentifier hasSuffix:@".plist"])
- << "TestUpdatableResource supports only the plist format";
- [_descriptor setBundleResourcePath:resourceIdentifier];
- }
- return self;
-}
-
-- (instancetype)init {
- NOTREACHED();
- return nil;
-}
-
-- (id<UpdatableResourceDescriptorBridge>)descriptor {
- return _descriptor.get();
-}
-
-- (id<UpdatableResourceDelegate>)delegate {
- return _delegate;
-}
-
-- (NSDictionary*)resourceData {
- return [NSDictionary
- dictionaryWithContentsOfFile:[_descriptor bundleResourcePath]];
-}
-- (void)loadDefaults {
- [_delegate loadDefaults:self];
-}
-
-@end
-
-#pragma mark - TestUpdatableResourceProvider
-
-namespace ios {
-
-NSString* TestUpdatableResourceProvider::GetUpdateNotificationName() {
- return @"ResourceUpdatedTest";
-}
-
-id<UpdatableResourceBridge>
-TestUpdatableResourceProvider::CreateUpdatableResource(
- NSString* resource_identifier,
- id<UpdatableResourceDelegate> delegate) {
- NSString* path =
- [NSString stringWithFormat:@"%@/gm-config/ANY/%@",
- [[NSBundle mainBundle] resourcePath],
- resource_identifier];
- return [[TestUpdatableResource alloc] initWithDelegate:delegate plist:path];
-}
-
-} // namespace ios
« no previous file with comments | « ios/public/test/test_updatable_resource_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698