| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/chromeos/arc/arc_navigation_throttle.h" | 5 #include "chrome/browser/chromeos/arc/arc_navigation_throttle.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 } | 30 } |
| 31 | 31 |
| 32 mojom::IntentHelperInstance* GetIntentHelper() { | 32 mojom::IntentHelperInstance* GetIntentHelper() { |
| 33 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 33 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 34 ArcBridgeService* bridge_service = ArcBridgeService::Get(); | 34 ArcBridgeService* bridge_service = ArcBridgeService::Get(); |
| 35 if (!bridge_service) { | 35 if (!bridge_service) { |
| 36 VLOG(1) << "ARC bridge is not ready."; | 36 VLOG(1) << "ARC bridge is not ready."; |
| 37 return nullptr; | 37 return nullptr; |
| 38 } | 38 } |
| 39 mojom::IntentHelperInstance* intent_helper_instance = | 39 mojom::IntentHelperInstance* intent_helper_instance = |
| 40 bridge_service->intent_helper_instance(); | 40 bridge_service->intent_helper()->instance(); |
| 41 if (!intent_helper_instance) { | 41 if (!intent_helper_instance) { |
| 42 VLOG(1) << "ARC intent helper instance is not ready."; | 42 VLOG(1) << "ARC intent helper instance is not ready."; |
| 43 return nullptr; | 43 return nullptr; |
| 44 } | 44 } |
| 45 if (bridge_service->intent_helper_version() < kMinInstanceVersion) { | 45 if (bridge_service->intent_helper()->version() < kMinInstanceVersion) { |
| 46 VLOG(1) << "ARC intent helper instance is too old."; | 46 VLOG(1) << "ARC intent helper instance is too old."; |
| 47 return nullptr; | 47 return nullptr; |
| 48 } | 48 } |
| 49 return intent_helper_instance; | 49 return intent_helper_instance; |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // namespace | 52 } // namespace |
| 53 | 53 |
| 54 ArcNavigationThrottle::ArcNavigationThrottle( | 54 ArcNavigationThrottle::ArcNavigationThrottle( |
| 55 content::NavigationHandle* navigation_handle, | 55 content::NavigationHandle* navigation_handle, |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 GURL previous_url = navigation_handle->GetReferrer().url; | 216 GURL previous_url = navigation_handle->GetReferrer().url; |
| 217 GURL current_url = navigation_handle->GetURL(); | 217 GURL current_url = navigation_handle->GetURL(); |
| 218 if (net::registry_controlled_domains::SameDomainOrHost( | 218 if (net::registry_controlled_domains::SameDomainOrHost( |
| 219 current_url, previous_url, | 219 current_url, previous_url, |
| 220 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)) | 220 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)) |
| 221 return false; | 221 return false; |
| 222 return true; | 222 return true; |
| 223 } | 223 } |
| 224 | 224 |
| 225 } // namespace arc | 225 } // namespace arc |
| OLD | NEW |