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

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

Issue 2271653006: base::mac::IsOSSierra() -> base::mac::IsOS10_12(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Nits Created 4 years, 3 months 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
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 "build/build_config.h" 9 #include "build/build_config.h"
10 #include "net/base/mac/url_conversions.h" 10 #include "net/base/mac/url_conversions.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 - (void)updateActiveURL:(const GURL&)url { 53 - (void)updateActiveURL:(const GURL&)url {
54 #if defined(OS_IOS) 54 #if defined(OS_IOS)
55 // Handoff is only available on iOS 8+. 55 // Handoff is only available on iOS 8+.
56 DCHECK(base::ios::IsRunningOnIOS8OrLater()); 56 DCHECK(base::ios::IsRunningOnIOS8OrLater());
57 #endif 57 #endif
58 58
59 #if defined(OS_MACOSX) && !defined(OS_IOS) 59 #if defined(OS_MACOSX) && !defined(OS_IOS)
60 // Handoff is only available on OSX 10.10+. 60 // Handoff is only available on OSX 10.10+.
61 DCHECK(base::mac::IsOSYosemiteOrLater()); 61 DCHECK(base::mac::IsAtLeastOS10_10());
62 #endif 62 #endif
63 63
64 _activeURL = url; 64 _activeURL = url;
65 [self updateUserActivity]; 65 [self updateUserActivity];
66 } 66 }
67 67
68 - (BOOL)shouldUseActiveURL { 68 - (BOOL)shouldUseActiveURL {
69 return _activeURL.SchemeIsHTTPOrHTTPS(); 69 return _activeURL.SchemeIsHTTPOrHTTPS();
70 } 70 }
71 71
(...skipping 19 matching lines...) Expand all
91 withObject:handoff::kChromeHandoffActivityType]; 91 withObject:handoff::kChromeHandoffActivityType];
92 self.userActivity = base::scoped_nsobject<NSUserActivity>(userActivity); 92 self.userActivity = base::scoped_nsobject<NSUserActivity>(userActivity);
93 self.userActivity.webpageURL = net::NSURLWithGURL(_activeURL); 93 self.userActivity.webpageURL = net::NSURLWithGURL(_activeURL);
94 NSString* origin = handoff::StringFromOrigin(_origin); 94 NSString* origin = handoff::StringFromOrigin(_origin);
95 DCHECK(origin); 95 DCHECK(origin);
96 self.userActivity.userInfo = @{ handoff::kOriginKey : origin }; 96 self.userActivity.userInfo = @{ handoff::kOriginKey : origin };
97 [self.userActivity becomeCurrent]; 97 [self.userActivity becomeCurrent];
98 } 98 }
99 99
100 @end 100 @end
OLDNEW
« no previous file with comments | « components/crash/content/app/breakpad_mac.mm ('k') | content/browser/accessibility/browser_accessibility_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698