Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(91)

Unified Diff: Vermilion/Modules/GoogleBookmarks/GoogleBookmarksSource.m

Issue 4675073: Fix up build Base URL: http://qsb-mac.googlecode.com/svn/trunk/
Patch Set: Created 14 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Vermilion/Modules/GoogleBookmarks/GoogleBookmarksSource.m
===================================================================
--- Vermilion/Modules/GoogleBookmarks/GoogleBookmarksSource.m (revision 1083)
+++ Vermilion/Modules/GoogleBookmarks/GoogleBookmarksSource.m (working copy)
@@ -31,7 +31,7 @@
//
#import <Vermilion/Vermilion.h>
-#import <GData/GDataHTTPFetcher.h>
+#import <GData/GTMHTTPFetcher.h>
#import <QSBPluginUI/QSBHGSResultAttributeKeys.h>
#import "HGSKeychainItem.h"
#import "GTMGoogleSearch.h"
@@ -57,12 +57,11 @@
operation:(NSOperation *)op
into:(HGSMemorySearchSourceDB*)database;
- (void)loginCredentialsChanged:(NSNotification *)notification;
-- (void)httpFetcher:(GDataHTTPFetcher *)fetcher
+- (void)httpFetcher:(GTMHTTPFetcher *)fetcher
finishedWithData:(NSData *)retrievedData
- operation:(NSOperation *)operation;
-- (void)httpFetcher:(GDataHTTPFetcher *)fetcher
- didFail:(NSError *)error
- operation:(NSOperation *)operation;
+ operation:(NSOperation *)operation
+ error:(NSError *)error;
+
@end
@implementation GoogleBookmarksSource
@@ -129,11 +128,10 @@
requestWithURL:bookmarkRequestURL
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:15.0];
- GDataHTTPFetcher *fetcher
- = [GDataHTTPFetcher httpFetcherWithRequest:bookmarkRequest];
+ GTMHTTPFetcher *fetcher = [GTMHTTPFetcher fetcherWithRequest:bookmarkRequest];
if (!fetcher) {
- HGSLog(@"Failed to allocate GDataHTTPFetcher.");
+ HGSLog(@"Failed to allocate GTMHTTPFetcher.");
}
HGSKeychainItem* keychainItem
= [HGSKeychainItem keychainItemForService:[account_ identifier]
@@ -145,15 +143,14 @@
password:password
persistence:NSURLCredentialPersistenceNone]];
[bookmarkRequest setHTTPMethod:@"POST"];
- [fetcher setRequest:bookmarkRequest];
+ [fetcher setMutableRequest:bookmarkRequest];
HGSOperationQueue *queue = [HGSOperationQueue sharedOperationQueue];
[fetchOperation_ release];
fetchOperation_
= [[HGSFetcherOperation alloc] initWithTarget:self
forFetcher:fetcher
- didFinishSelector:@selector(httpFetcher:finishedWithData:operation:)
- didFailSelector:@selector(httpFetcher:didFail:operation:)];
+ didFinishSelector:@selector(httpFetcher:finishedWithData:operation:error:)];
[queue addOperation:fetchOperation_];
}
}
@@ -272,20 +269,19 @@
}
#pragma mark -
-#pragma mark GDataHTTPFetcher Helpers
+#pragma mark GTMHTTPFetcher Helpers
-- (void)httpFetcher:(GDataHTTPFetcher *)fetcher
+- (void)httpFetcher:(GTMHTTPFetcher *)fetcher
finishedWithData:(NSData *)retrievedData
- operation:(NSOperation *)operation {
- [self indexBookmarksFromData:retrievedData operation:operation];
+ operation:(NSOperation *)operation
+ error:(NSError *)error {
+ if (error) {
+ HGSLog(@"httpFetcher failed: %@ %@", error, [[fetcher mutableRequest] URL]);
+ } else {
+ [self indexBookmarksFromData:retrievedData operation:operation];
+ }
}
-- (void)httpFetcher:(GDataHTTPFetcher *)fetcher
- didFail:(NSError *)error
- operation:(NSOperation *)operation {
- HGSLog(@"httpFetcher failed: %@ %@", error, [[fetcher request] URL]);
-}
-
#pragma mark -
#pragma mark Authentication & Refresh
« no previous file with comments | « Vermilion/Modules/GoogleAccounts/GoogleAccount.m ('k') | Vermilion/Modules/GoogleDocs/GoogleDocsSaveAsActions.m » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b