You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2015/06/25 03:09:05 UTC
[17/50] ios commit: uncrustify style fix-ups
uncrustify style fix-ups
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/a2e842d0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/a2e842d0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/a2e842d0
Branch: refs/heads/master
Commit: a2e842d0571ca1e95e33015ca3a6011c5ee364ed
Parents: e38875d
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Apr 20 17:45:00 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Apr 20 17:45:00 2015 -0700
----------------------------------------------------------------------
CordovaLib/Classes/Public/CDVViewController.m | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/a2e842d0/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index 87d2fa6..d880c84 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -158,7 +158,7 @@
return [self shouldAllowNavigationToURL:url];
}
-- (void)parseSettingsWithParser:(NSObject<NSXMLParserDelegate> *)delegate
+- (void)parseSettingsWithParser:(NSObject <NSXMLParserDelegate>*)delegate
{
// read from config.xml in the app bundle
NSString* path = [[NSBundle mainBundle] pathForResource:@"config" ofType:@"xml"];
@@ -182,6 +182,7 @@
- (void)loadSettings
{
CDVConfigParser* delegate = [[CDVConfigParser alloc] init];
+
[self parseSettingsWithParser:delegate];
// Get the plugin dictionary, whitelist and settings from the delegate.
@@ -637,7 +638,7 @@
/* This implements the default policy for resource loading and navigation, if there
* are no plugins installed which override the whitelist methods.
*/
-- (BOOL)defaultResourcePolicyForURL:(NSURL *)url
+- (BOOL)defaultResourcePolicyForURL:(NSURL*)url
{
/*
* If a URL is being loaded that's a file/http/https URL, just load it internally
@@ -663,10 +664,11 @@
return NO;
}
-- (BOOL)shouldAllowRequestForURL:(NSURL *)url
+- (BOOL)shouldAllowRequestForURL:(NSURL*)url
{
BOOL anyPluginsResponded = NO;
BOOL shouldAllowRequest = NO;
+
for (NSString* pluginName in pluginObjects) {
CDVPlugin* plugin = [pluginObjects objectForKey:pluginName];
SEL selector = NSSelectorFromString(@"shouldAllowRequestForURL:");
@@ -678,6 +680,7 @@
}
}
}
+
if (anyPluginsResponded) {
return shouldAllowRequest;
}
@@ -686,11 +689,11 @@
return [self defaultResourcePolicyForURL:url];
}
-
-- (BOOL)shouldAllowNavigationToURL:(NSURL *)url
+- (BOOL)shouldAllowNavigationToURL:(NSURL*)url
{
BOOL anyPluginsResponded = NO;
BOOL shouldAllowNavigation = NO;
+
for (NSString* pluginName in pluginObjects) {
CDVPlugin* plugin = [pluginObjects objectForKey:pluginName];
SEL selector = NSSelectorFromString(@"shouldAllowNavigationToURL:");
@@ -702,6 +705,7 @@
}
}
}
+
if (anyPluginsResponded) {
return shouldAllowNavigation;
}
@@ -710,10 +714,11 @@
return [self defaultResourcePolicyForURL:url];
}
-- (BOOL)shouldOpenExternalURL:(NSURL *)url
+- (BOOL)shouldOpenExternalURL:(NSURL*)url
{
BOOL anyPluginsResponded = NO;
BOOL shouldOpenExternalURL = NO;
+
for (NSString* pluginName in pluginObjects) {
CDVPlugin* plugin = [pluginObjects objectForKey:pluginName];
SEL selector = NSSelectorFromString(@"shouldOpenExternalURL:");
@@ -725,6 +730,7 @@
}
}
}
+
if (anyPluginsResponded) {
return shouldOpenExternalURL;
}
@@ -745,7 +751,7 @@
+ (NSString*)applicationDocumentsDirectory
{
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- NSString* basePath = (([paths count] > 0) ? ([paths objectAtIndex : 0]) : nil);
+ NSString* basePath = (([paths count] > 0) ? ([paths objectAtIndex:0]) : nil);
return basePath;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org