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

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

Issue 2190483003: arc: Revamp the ArcBridgeService interface (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2785
Patch Set: One less diff line Created 4 years, 4 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 19 matching lines...) Expand all
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
216 return; 216 return;
217 } 217 }
218 } 218 }
219 219
220 UMA_HISTOGRAM_ENUMERATION("Arc.IntentHandlerAction", 220 UMA_HISTOGRAM_ENUMERATION("Arc.IntentHandlerAction",
221 static_cast<int>(close_reason), 221 static_cast<int>(close_reason),
222 static_cast<int>(CloseReason::SIZE)); 222 static_cast<int>(CloseReason::SIZE));
223 } 223 }
224 224
225 } // namespace arc 225 } // 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