Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: FavIcon/URLRequestOperation.swift

Issue 29664569: Favicon: Issue 6245 - SwiftLinted project files (Closed)
Patch Set: Favicon: Issue 6245 - Swiftlinted project files Created Jan. 16, 2018, 12:55 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: FavIcon/URLRequestOperation.swift
diff --git a/FavIcon/URLRequestOperation.swift b/FavIcon/URLRequestOperation.swift
index 96bbb435e3d130c8726d749bb685e991fbb3ed74..15264903eb9fedf226e83408992a07a726548cef 100644
--- a/FavIcon/URLRequestOperation.swift
+++ b/FavIcon/URLRequestOperation.swift
@@ -61,11 +61,12 @@ class URLRequestOperation: Operation {
@objc var urlRequest: URLRequest
var result: URLResult?
- fileprivate var task: URLSessionDataTask?
- fileprivate let session: URLSession
- fileprivate var semaphore: DispatchSemaphore?
+ private var task: URLSessionDataTask?
+ private let session: URLSession
+ private var semaphore: DispatchSemaphore?
- @objc init(url: URL, session: URLSession) {
+ @objc
+ init(url: URL, session: URLSession) {
self.session = session
self.urlRequest = URLRequest(url: url)
self.semaphore = nil
@@ -86,14 +87,15 @@ class URLRequestOperation: Operation {
}
}
- @objc func prepareRequest() {
+ @objc
+ func prepareRequest() {
}
func processResult(_ data: Data?, response: HTTPURLResponse, completion: @escaping (URLResult) -> Void) {
fatalError("must override processResult()")
}
- fileprivate func dataTaskCompletion(_ data: Data?, response: URLResponse?, error: Error?) {
+ private func dataTaskCompletion(_ data: Data?, response: URLResponse?, error: Error?) {
guard error == nil else {
result = .failed(error: error!)
self.notifyFinished()
@@ -126,7 +128,7 @@ class URLRequestOperation: Operation {
}
}
- fileprivate func notifyFinished() {
+ private func notifyFinished() {
if let semaphore = self.semaphore {
semaphore.signal()
}

Powered by Google App Engine
This is Rietveld