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

Unified Diff: ios/public/provider/chrome/browser/native_app_launcher/fake_native_app_whitelist_manager.mm

Issue 2529763002: Create FakeProviders for NativeAppMetadata and NativeAppManager (Closed)
Patch Set: Rebase and CL Feedback Created 4 years, 1 month 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/provider/chrome/browser/native_app_launcher/fake_native_app_whitelist_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/public/provider/chrome/browser/native_app_launcher/fake_native_app_whitelist_manager.mm
diff --git a/ios/public/provider/chrome/browser/native_app_launcher/fake_native_app_whitelist_manager.mm b/ios/public/provider/chrome/browser/native_app_launcher/fake_native_app_whitelist_manager.mm
new file mode 100644
index 0000000000000000000000000000000000000000..5f552b72b542c7b6c9413c7292d6ff73e373ee76
--- /dev/null
+++ b/ios/public/provider/chrome/browser/native_app_launcher/fake_native_app_whitelist_manager.mm
@@ -0,0 +1,42 @@
+// Copyright 2016 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/provider/chrome/browser/native_app_launcher/fake_native_app_whitelist_manager.h"
+
+#include "base/mac/scoped_nsobject.h"
+#include "url/gurl.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+@implementation FakeNativeAppWhitelistManager
+
+@synthesize metadata = _metadata;
+@synthesize appWhitelist = _appWhitelist;
+@synthesize appScheme = _appScheme;
+
+- (void)setAppList:(NSArray*)appList
+ tldList:(NSArray*)tldList
+ acceptStoreIDs:(NSArray*)storeIDs {
+ _appWhitelist = appList;
+}
+
+- (id<NativeAppMetadata>)newNativeAppForURL:(const GURL&)url {
+ return _metadata;
+}
+
+- (NSArray*)filteredAppsUsingBlock:(NativeAppFilter)condition {
+ return _appWhitelist;
+}
+
+- (NSURL*)schemeForAppId:(NSString*)appId {
+ return [NSURL URLWithString:[NSString stringWithFormat:@"%@://", _appScheme]];
+}
+
+- (void)checkInstalledApps {
+ return;
+}
+
+@end
« no previous file with comments | « ios/public/provider/chrome/browser/native_app_launcher/fake_native_app_whitelist_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698