Chromium Code Reviews| Index: components/handoff/handoff_manager.mm |
| diff --git a/components/handoff/handoff_manager.mm b/components/handoff/handoff_manager.mm |
| index ab1efd693a5f701accbef39d1f56266cfb14f8eb..0f889d161f8df5eeab8f23e934fd3953c99468c1 100644 |
| --- a/components/handoff/handoff_manager.mm |
| +++ b/components/handoff/handoff_manager.mm |
| @@ -6,7 +6,6 @@ |
| #include "base/logging.h" |
| #include "base/mac/scoped_nsobject.h" |
| -#include "components/handoff/handoff_utility.h" |
| #include "net/base/mac/url_conversions.h" |
| #if defined(OS_IOS) |
| @@ -39,6 +38,13 @@ |
| self = [super init]; |
| if (self) { |
| _propertyReleaser_HandoffManager.Init(self, [HandoffManager class]); |
| +#if defined(OS_MACOSX) && !defined(OS_IOS) |
| + _origin = handoff::ORIGIN_MAC; |
| +#elif defined(OS_IOS) |
| + _origin = handoff::ORIGIN_IOS; |
|
Avi (use Gerrit)
2015/03/26 18:40:21
#if defined(OS_IOS)
_origin = handoff::ORIGIN_
erikchen
2015/03/27 14:52:24
I'm generally a fan of shorter code, but in this c
Avi (use Gerrit)
2015/03/27 15:16:38
That makes sense.
|
| +#else |
| + NOTREACHED(); |
| +#endif |
| } |
| return self; |
| } |
| @@ -84,7 +90,9 @@ |
| withObject:handoff::kChromeHandoffActivityType]; |
| self.userActivity = base::scoped_nsobject<NSUserActivity>(userActivity); |
| self.userActivity.webpageURL = net::NSURLWithGURL(_activeURL); |
| - self.userActivity.userInfo = @{ handoff::kOriginKey : handoff::kOriginiOS }; |
| + NSString* origin = handoff::StringFromOrigin(_origin); |
| + DCHECK(origin); |
| + self.userActivity.userInfo = @{ handoff::kOriginKey : origin }; |
| [self.userActivity becomeCurrent]; |
| } |