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

Side by Side Diff: components/handoff/handoff_manager.mm

Issue 2487073002: Remove unnecessary check for iOS 8 in handoff_manager.mm (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/handoff/handoff_manager.h" 5 #include "components/handoff/handoff_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "net/base/mac/url_conversions.h" 9 #include "net/base/mac/url_conversions.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #elif defined(OS_IOS) 53 #elif defined(OS_IOS)
54 _origin = handoff::ORIGIN_IOS; 54 _origin = handoff::ORIGIN_IOS;
55 #else 55 #else
56 NOTREACHED(); 56 NOTREACHED();
57 #endif 57 #endif
58 } 58 }
59 return self; 59 return self;
60 } 60 }
61 61
62 - (void)updateActiveURL:(const GURL&)url { 62 - (void)updateActiveURL:(const GURL&)url {
63 #if defined(OS_IOS)
64 // Handoff is only available on iOS 8+.
65 DCHECK(base::ios::IsRunningOnIOS8OrLater());
66 #endif
67
68 #if defined(OS_MACOSX) && !defined(OS_IOS) 63 #if defined(OS_MACOSX) && !defined(OS_IOS)
69 // Handoff is only available on OSX 10.10+. 64 // Handoff is only available on OSX 10.10+.
70 DCHECK(base::mac::IsAtLeastOS10_10()); 65 DCHECK(base::mac::IsAtLeastOS10_10());
71 #endif 66 #endif
72 67
73 _activeURL = url; 68 _activeURL = url;
74 [self updateUserActivity]; 69 [self updateUserActivity];
75 } 70 }
76 71
77 - (BOOL)shouldUseActiveURL { 72 - (BOOL)shouldUseActiveURL {
(...skipping 30 matching lines...) Expand all
108 103
109 @end 104 @end
110 105
111 @implementation HandoffManager (TestingOnly) 106 @implementation HandoffManager (TestingOnly)
112 107
113 - (NSURL*)userActivityWebpageURL { 108 - (NSURL*)userActivityWebpageURL {
114 return self.userActivity.webpageURL; 109 return self.userActivity.webpageURL;
115 } 110 }
116 111
117 @end 112 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698