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

Side by Side Diff: chrome/browser/chromeos/arc/arc_navigation_throttle.cc

Issue 2133503002: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: More rebasing Created 4 years, 5 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 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 17 matching lines...) Expand all
28 } 28 }
29 29
30 mojom::IntentHelperInstance* GetIntentHelper() { 30 mojom::IntentHelperInstance* GetIntentHelper() {
31 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 31 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
32 ArcBridgeService* bridge_service = ArcBridgeService::Get(); 32 ArcBridgeService* bridge_service = ArcBridgeService::Get();
33 if (!bridge_service) { 33 if (!bridge_service) {
34 VLOG(1) << "ARC bridge is not ready."; 34 VLOG(1) << "ARC bridge is not ready.";
35 return nullptr; 35 return nullptr;
36 } 36 }
37 mojom::IntentHelperInstance* intent_helper_instance = 37 mojom::IntentHelperInstance* intent_helper_instance =
38 bridge_service->intent_helper_instance(); 38 bridge_service->intent_helper()->instance();
39 if (!intent_helper_instance) { 39 if (!intent_helper_instance) {
40 VLOG(1) << "ARC intent helper instance is not ready."; 40 VLOG(1) << "ARC intent helper instance is not ready.";
41 return nullptr; 41 return nullptr;
42 } 42 }
43 if (bridge_service->intent_helper_version() < kMinInstanceVersion) { 43 if (bridge_service->intent_helper()->version() < kMinInstanceVersion) {
44 VLOG(1) << "ARC intent helper instance is too old."; 44 VLOG(1) << "ARC intent helper instance is too old.";
45 return nullptr; 45 return nullptr;
46 } 46 }
47 return intent_helper_instance; 47 return intent_helper_instance;
48 } 48 }
49 49
50 } // namespace 50 } // namespace
51 51
52 ArcNavigationThrottle::ArcNavigationThrottle( 52 ArcNavigationThrottle::ArcNavigationThrottle(
53 content::NavigationHandle* navigation_handle, 53 content::NavigationHandle* navigation_handle,
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool ArcNavigationThrottle::ShouldOverrideUrlLoading( 209 bool ArcNavigationThrottle::ShouldOverrideUrlLoading(
210 content::NavigationHandle* navigation_handle) { 210 content::NavigationHandle* navigation_handle) {
211 GURL previous_url = navigation_handle->GetReferrer().url; 211 GURL previous_url = navigation_handle->GetReferrer().url;
212 GURL current_url = navigation_handle->GetURL(); 212 GURL current_url = navigation_handle->GetURL();
213 return !net::registry_controlled_domains::SameDomainOrHost( 213 return !net::registry_controlled_domains::SameDomainOrHost(
214 current_url, previous_url, 214 current_url, previous_url,
215 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); 215 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
216 } 216 }
217 217
218 } // namespace arc 218 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_downloads_watcher_service.cc ('k') | chrome/browser/chromeos/arc/arc_policy_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698