Commit c565df2c authored by mattreynolds's avatar mattreynolds Committed by Commit bot

Add a Physical Web data source

Add a helper class for accessing nearby URL metadata and controlling
Physical Web scanning and URL resolution from C++. This metadata will be used
by an omnibox autocomplete provider which should not depend on ios/chrome.

BUG=630769

Review-Url: https://codereview.chromium.org/2113473002
Cr-Commit-Position: refs/heads/master@{#410829}
parent 1ffc3026
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
'os_crypt.gypi', 'os_crypt.gypi',
'ownership.gypi', 'ownership.gypi',
'password_manager.gypi', 'password_manager.gypi',
'physical_web.gypi',
'plugins.gypi', 'plugins.gypi',
'policy.gypi', 'policy.gypi',
'precache.gypi', 'precache.gypi',
......
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
# GN version: //components/physical_web/data_source
'target_name': 'physical_web_data_source',
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
],
'include_dirs': [
'..',
],
'sources': [
# Note: sources list duplicated in GN build.
'physical_web/data_source/physical_web_data_source.h',
],
},
],
}
mattreynolds@chromium.org
olivierrobin@chromium.org
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("data_source") {
sources = [
"physical_web_data_source.h",
]
deps = [
"//base",
]
}
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_
#define COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_
#include <memory>
namespace base {
class ListValue;
}
// Helper class for accessing Physical Web metadata and controlling the scanner.
class PhysicalWebDataSource {
public:
virtual ~PhysicalWebDataSource() {}
// Starts scanning for Physical Web URLs. If |network_request_enabled| is
// true, discovered URLs will be sent to a resolution service.
virtual void StartDiscovery(bool network_request_enabled) = 0;
// Stops scanning for Physical Web URLs and clears cached URL content.
virtual void StopDiscovery() = 0;
// Returns a list of resolved URLs and associated page metadata. If network
// requests are disabled or if discovery is not active, the list will be
// empty. The method can be called at any time to receive the current metadata
// list.
virtual std::unique_ptr<base::ListValue> GetMetadata() = 0;
// Returns boolean |true| if network requests are disabled and there are one
// or more discovered URLs that have not been sent to the resolution service.
// The method can be called at any time to check for unresolved discoveries.
// If discovery is inactive or network requests are enabled, it will always
// return false.
virtual bool HasUnresolvedDiscoveries() = 0;
};
#endif // COMPONENTS_PHYSICAL_WEB_DATA_SOURCE_PHYSICAL_WEB_DATA_SOURCE_H_
...@@ -317,6 +317,8 @@ source_set("browser") { ...@@ -317,6 +317,8 @@ source_set("browser") {
"passwords/passwords_ui_delegate.h", "passwords/passwords_ui_delegate.h",
"passwords/update_password_infobar_controller.h", "passwords/update_password_infobar_controller.h",
"passwords/update_password_infobar_controller.mm", "passwords/update_password_infobar_controller.mm",
"physical_web/create_physical_web_data_source.h",
"physical_web/create_physical_web_data_source.mm",
"physical_web/physical_web_constants.h", "physical_web/physical_web_constants.h",
"pref_names.cc", "pref_names.cc",
"pref_names.h", "pref_names.h",
...@@ -650,6 +652,7 @@ source_set("browser") { ...@@ -650,6 +652,7 @@ source_set("browser") {
"//components/password_manager/core/browser", "//components/password_manager/core/browser",
"//components/password_manager/core/common", "//components/password_manager/core/common",
"//components/password_manager/sync/browser", "//components/password_manager/sync/browser",
"//components/physical_web/data_source",
"//components/policy:policy_component_common", "//components/policy:policy_component_common",
"//components/pref_registry", "//components/pref_registry",
"//components/prefs", "//components/prefs",
...@@ -690,6 +693,7 @@ source_set("browser") { ...@@ -690,6 +693,7 @@ source_set("browser") {
"//ios/chrome/browser/variations:ios_chrome_ui_string_overrider_factory", "//ios/chrome/browser/variations:ios_chrome_ui_string_overrider_factory",
"//ios/chrome/common", "//ios/chrome/common",
"//ios/chrome/common/app_group", "//ios/chrome/common/app_group",
"//ios/chrome/common/physical_web",
"//ios/net", "//ios/net",
"//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser",
"//ios/public/provider/web", "//ios/public/provider/web",
......
...@@ -44,6 +44,7 @@ include_rules = [ ...@@ -44,6 +44,7 @@ include_rules = [
"+components/password_manager/core/browser", "+components/password_manager/core/browser",
"+components/password_manager/core/common", "+components/password_manager/core/common",
"+components/password_manager/sync/browser", "+components/password_manager/sync/browser",
"+components/physical_web/data_source",
"+components/pref_registry", "+components/pref_registry",
"+components/prefs", "+components/prefs",
"+components/profile_metrics", "+components/profile_metrics",
......
...@@ -56,6 +56,7 @@ class VariationsService; ...@@ -56,6 +56,7 @@ class VariationsService;
class ApplicationContext; class ApplicationContext;
class CRLSetFetcher; class CRLSetFetcher;
class IOSChromeIOThread; class IOSChromeIOThread;
class PhysicalWebDataSource;
class PrefService; class PrefService;
// Gets the global application context. Cannot return null. // Gets the global application context. Cannot return null.
...@@ -124,6 +125,9 @@ class ApplicationContext { ...@@ -124,6 +125,9 @@ class ApplicationContext {
// Gets the CRLSetFetcher. // Gets the CRLSetFetcher.
virtual CRLSetFetcher* GetCRLSetFetcher() = 0; virtual CRLSetFetcher* GetCRLSetFetcher() = 0;
// Gets the PhysicalWebDataSource.
virtual PhysicalWebDataSource* GetPhysicalWebDataSource() = 0;
protected: protected:
// Sets the global ApplicationContext instance. // Sets the global ApplicationContext instance.
static void SetApplicationContext(ApplicationContext* context); static void SetApplicationContext(ApplicationContext* context);
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "components/metrics_services_manager/metrics_services_manager.h" #include "components/metrics_services_manager/metrics_services_manager.h"
#include "components/net_log/chrome_net_log.h" #include "components/net_log/chrome_net_log.h"
#include "components/network_time/network_time_tracker.h" #include "components/network_time/network_time_tracker.h"
#include "components/physical_web/data_source/physical_web_data_source.h"
#include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/translate/core/browser/translate_download_manager.h" #include "components/translate/core/browser/translate_download_manager.h"
...@@ -43,6 +44,7 @@ ...@@ -43,6 +44,7 @@
#include "ios/chrome/browser/ios_chrome_io_thread.h" #include "ios/chrome/browser/ios_chrome_io_thread.h"
#include "ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.h" #include "ios/chrome/browser/metrics/ios_chrome_metrics_services_manager_client.h"
#include "ios/chrome/browser/net/crl_set_fetcher.h" #include "ios/chrome/browser/net/crl_set_fetcher.h"
#include "ios/chrome/browser/physical_web/create_physical_web_data_source.h"
#include "ios/chrome/browser/pref_names.h" #include "ios/chrome/browser/pref_names.h"
#include "ios/chrome/browser/prefs/browser_prefs.h" #include "ios/chrome/browser/prefs/browser_prefs.h"
#include "ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h" #include "ios/chrome/browser/prefs/ios_chrome_pref_service_factory.h"
...@@ -296,6 +298,15 @@ CRLSetFetcher* ApplicationContextImpl::GetCRLSetFetcher() { ...@@ -296,6 +298,15 @@ CRLSetFetcher* ApplicationContextImpl::GetCRLSetFetcher() {
return crl_set_fetcher_.get(); return crl_set_fetcher_.get();
} }
PhysicalWebDataSource* ApplicationContextImpl::GetPhysicalWebDataSource() {
DCHECK(thread_checker_.CalledOnValidThread());
if (!physical_web_data_source_) {
physical_web_data_source_ = CreateIOSChromePhysicalWebDataSource();
DCHECK(physical_web_data_source_);
}
return physical_web_data_source_.get();
}
void ApplicationContextImpl::SetApplicationLocale(const std::string& locale) { void ApplicationContextImpl::SetApplicationLocale(const std::string& locale) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
application_locale_ = locale; application_locale_ = locale;
......
...@@ -64,6 +64,7 @@ class ApplicationContextImpl : public ApplicationContext { ...@@ -64,6 +64,7 @@ class ApplicationContextImpl : public ApplicationContext {
component_updater::ComponentUpdateService* GetComponentUpdateService() component_updater::ComponentUpdateService* GetComponentUpdateService()
override; override;
CRLSetFetcher* GetCRLSetFetcher() override; CRLSetFetcher* GetCRLSetFetcher() override;
PhysicalWebDataSource* GetPhysicalWebDataSource() override;
private: private:
// Sets the locale used by the application. // Sets the locale used by the application.
...@@ -87,6 +88,7 @@ class ApplicationContextImpl : public ApplicationContext { ...@@ -87,6 +88,7 @@ class ApplicationContextImpl : public ApplicationContext {
scoped_refptr<CRLSetFetcher> crl_set_fetcher_; scoped_refptr<CRLSetFetcher> crl_set_fetcher_;
std::unique_ptr<ios::ChromeBrowserStateManager> chrome_browser_state_manager_; std::unique_ptr<ios::ChromeBrowserStateManager> chrome_browser_state_manager_;
std::string application_locale_; std::string application_locale_;
std::unique_ptr<PhysicalWebDataSource> physical_web_data_source_;
// Sequenced task runner for local state related I/O tasks. // Sequenced task runner for local state related I/O tasks.
const scoped_refptr<base::SequencedTaskRunner> local_state_task_runner_; const scoped_refptr<base::SequencedTaskRunner> local_state_task_runner_;
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_PHYSICAL_WEB_CREATE_PHYSICAL_WEB_DATA_SOURCE_H_
#define IOS_CHROME_BROWSER_PHYSICAL_WEB_CREATE_PHYSICAL_WEB_DATA_SOURCE_H_
#include <memory>
class PhysicalWebDataSource;
// Creates a new instance of IOSChromePhysicalWebDataSource. The returned object
// is fully initialized and can be registered as global singleton.
std::unique_ptr<PhysicalWebDataSource> CreateIOSChromePhysicalWebDataSource();
#endif // IOS_CHROME_BROWSER_PHYSICAL_WEB_CREATE_PHYSICAL_WEB_DATA_SOURCE_H_
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ios/chrome/browser/physical_web/create_physical_web_data_source.h"
#include "base/memory/ptr_util.h"
#import "ios/chrome/common/physical_web/ios_chrome_physical_web_data_source.h"
std::unique_ptr<PhysicalWebDataSource> CreateIOSChromePhysicalWebDataSource() {
return base::MakeUnique<IOSChromePhysicalWebDataSource>();
}
...@@ -16,6 +16,7 @@ source_set("common") { ...@@ -16,6 +16,7 @@ source_set("common") {
"//base", "//base",
"//components/version_info", "//components/version_info",
"//ios/chrome/common/app_group:main_app", "//ios/chrome/common/app_group:main_app",
"//ios/chrome/common/physical_web:physical_web",
] ]
libs = [ libs = [
......
include_rules = [ include_rules = [
"+components/physical_web/data_source",
"+components/version_info", "+components/version_info",
] ]
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
source_set("physical_web") { source_set("physical_web") {
sources = [ sources = [
"ios_chrome_physical_web_data_source.h",
"ios_chrome_physical_web_data_source.mm",
"physical_web_device.h", "physical_web_device.h",
"physical_web_device.mm", "physical_web_device.mm",
"physical_web_request.h", "physical_web_request.h",
...@@ -16,6 +18,7 @@ source_set("physical_web") { ...@@ -16,6 +18,7 @@ source_set("physical_web") {
deps = [ deps = [
"//base", "//base",
"//components/physical_web/data_source",
"//components/version_info", "//components/version_info",
"//device/bluetooth/uribeacon", "//device/bluetooth/uribeacon",
"//google_apis", "//google_apis",
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_COMMON_PHYSICAL_WEB_IOS_CHROME_PHYSICAL_WEB_DATA_SOURCE_H_
#define IOS_CHROME_COMMON_PHYSICAL_WEB_IOS_CHROME_PHYSICAL_WEB_DATA_SOURCE_H_
#include "base/macros.h"
#import "base/mac/scoped_nsobject.h"
#include "components/physical_web/data_source/physical_web_data_source.h"
namespace base {
class ListValue;
}
@class PhysicalWebScanner;
// iOS implementation of PhysicalWebDataSource
class IOSChromePhysicalWebDataSource : public PhysicalWebDataSource {
public:
IOSChromePhysicalWebDataSource();
~IOSChromePhysicalWebDataSource() override;
// Starts scanning for Physical Web URLs. If |network_request_enabled| is
// true, discovered URLs will be sent to a resolution service.
void StartDiscovery(bool network_request_enabled) override;
// Stops scanning for Physical Web URLs and clears cached URL content.
void StopDiscovery() override;
// Returns a list of resolved URLs and associated page metadata. If network
// requests are disabled, the list will be empty.
std::unique_ptr<base::ListValue> GetMetadata() override;
// Returns boolean |true| if network requests are disabled and there are one
// or more discovered URLs that have not been sent to the resolution service.
bool HasUnresolvedDiscoveries() override;
private:
// Scanner for nearby Physical Web URL devices.
base::scoped_nsobject<PhysicalWebScanner> scanner_;
DISALLOW_COPY_AND_ASSIGN(IOSChromePhysicalWebDataSource);
};
#endif // IOS_CHROME_COMMON_PHYSICAL_WEB_IOS_CHROME_PHYSICAL_WEB_DATA_SOURCE_H_
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/common/physical_web/ios_chrome_physical_web_data_source.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/values.h"
#import "ios/chrome/common/physical_web/physical_web_scanner.h"
IOSChromePhysicalWebDataSource::IOSChromePhysicalWebDataSource() {}
IOSChromePhysicalWebDataSource::~IOSChromePhysicalWebDataSource() {
StopDiscovery();
}
void IOSChromePhysicalWebDataSource::StartDiscovery(
bool network_request_enabled) {
// If there are unresolved beacons it means the scanner is started but does
// not have network requests enabled. In this case we should avoid recreating
// the scanner as it would clear the cache of nearby beacons.
if (network_request_enabled && HasUnresolvedDiscoveries()) {
[scanner_ setNetworkRequestEnabled:YES];
return;
}
[scanner_ stop];
scanner_.reset([[PhysicalWebScanner alloc] initWithDelegate:nil]);
[scanner_ setNetworkRequestEnabled:network_request_enabled];
[scanner_ start];
}
void IOSChromePhysicalWebDataSource::StopDiscovery() {
[scanner_ stop];
scanner_.reset();
}
std::unique_ptr<base::ListValue> IOSChromePhysicalWebDataSource::GetMetadata() {
std::unique_ptr<base::ListValue> metadata = [scanner_ metadata];
DCHECK(metadata);
return metadata;
}
bool IOSChromePhysicalWebDataSource::HasUnresolvedDiscoveries() {
return [scanner_ unresolvedBeaconsCount] > 0;
}
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
'target_name': 'physical_web', 'target_name': 'physical_web',
'type': 'static_library', 'type': 'static_library',
'sources': [ 'sources': [
'ios_chrome_physical_web_data_source.h',
'ios_chrome_physical_web_data_source.mm',
'physical_web_device.h', 'physical_web_device.h',
'physical_web_device.mm', 'physical_web_device.mm',
'physical_web_request.h', 'physical_web_request.h',
...@@ -20,6 +22,7 @@ ...@@ -20,6 +22,7 @@
], ],
'dependencies': [ 'dependencies': [
'../../../../base/base.gyp:base', '../../../../base/base.gyp:base',
'../../../../components/components.gyp:physical_web_data_source',
'../../../../components/components.gyp:version_info', '../../../../components/components.gyp:version_info',
'../../../../device/bluetooth/bluetooth.gyp:uribeacon', '../../../../device/bluetooth/bluetooth.gyp:uribeacon',
'../../../../google_apis/google_apis.gyp:google_apis', '../../../../google_apis/google_apis.gyp:google_apis',
......
...@@ -7,7 +7,11 @@ ...@@ -7,7 +7,11 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
@class PhysicalWebDevice; #include <memory>
namespace base {
class ListValue;
}
@protocol PhysicalWebScannerDelegate; @protocol PhysicalWebScannerDelegate;
...@@ -43,6 +47,11 @@ ...@@ -43,6 +47,11 @@
// Returns a list of physical web devices (PhysicalWebDevice). // Returns a list of physical web devices (PhysicalWebDevice).
- (NSArray*)devices; - (NSArray*)devices;
// Returns the metadata for all resolved physical web URLs. The returned value
// will never be nil; if no metadata has been received then an empty list is
// returned.
- (std::unique_ptr<base::ListValue>)metadata;
@end @end
@protocol PhysicalWebScannerDelegate<NSObject> @protocol PhysicalWebScannerDelegate<NSObject>
......
...@@ -4,20 +4,21 @@ ...@@ -4,20 +4,21 @@
#import "ios/chrome/common/physical_web/physical_web_scanner.h" #import "ios/chrome/common/physical_web/physical_web_scanner.h"
#import <CoreBluetooth/CoreBluetooth.h>
#include <string> #include <string>
#include <vector> #include <vector>
#import <CoreBluetooth/CoreBluetooth.h> #import "base/ios/weak_nsobject.h"
#include "base/ios/weak_nsobject.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/mac/scoped_nsobject.h" #import "base/mac/scoped_nsobject.h"
#include "base/macros.h" #include "base/memory/ptr_util.h"
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "base/values.h"
#include "device/bluetooth/uribeacon/uri_encoder.h" #include "device/bluetooth/uribeacon/uri_encoder.h"
#include "ios/chrome/common/physical_web/physical_web_device.h" #import "ios/chrome/common/physical_web/physical_web_device.h"
#import "ios/chrome/common/physical_web/physical_web_request.h" #import "ios/chrome/common/physical_web/physical_web_request.h"
#include "ios/chrome/common/physical_web/physical_web_types.h" #import "ios/chrome/common/physical_web/physical_web_types.h"
namespace { namespace {
...@@ -149,6 +150,30 @@ enum BeaconType { ...@@ -149,6 +150,30 @@ enum BeaconType {
}]; }];
} }
- (std::unique_ptr<base::ListValue>)metadata {
auto metadataList = base::MakeUnique<base::ListValue>();
for (PhysicalWebDevice* device in [self devices]) {
std::string scannedUrl =
base::SysNSStringToUTF8([[device requestURL] absoluteString]);
std::string resolvedUrl =
base::SysNSStringToUTF8([[device url] absoluteString]);
std::string icon = base::SysNSStringToUTF8([[device icon] absoluteString]);
std::string title = base::SysNSStringToUTF8([device title]);
std::string description = base::SysNSStringToUTF8([device description]);
auto metadataItem = base::MakeUnique<base::DictionaryValue>();
metadataItem->SetString("scannedUrl", scannedUrl);
metadataItem->SetString("resolvedUrl", resolvedUrl);
metadataItem->SetString("icon", icon);
metadataItem->SetString("title", title);
metadataItem->SetString("description", description);
metadataList->Append(std::move(metadataItem));
}
return metadataList;
}
- (void)setNetworkRequestEnabled:(BOOL)enabled { - (void)setNetworkRequestEnabled:(BOOL)enabled {
if (networkRequestEnabled_ == enabled) { if (networkRequestEnabled_ == enabled) {
return; return;
...@@ -294,7 +319,13 @@ enum BeaconType { ...@@ -294,7 +319,13 @@ enum BeaconType {
std::string utf8URI; std::string utf8URI;
device::DecodeUriBeaconUri(encodedURI, utf8URI); device::DecodeUriBeaconUri(encodedURI, utf8URI);
NSString* uriString = base::SysUTF8ToNSString(utf8URI); NSString* uriString = base::SysUTF8ToNSString(utf8URI);
return [[PhysicalWebDevice alloc] initWithURL:[NSURL URLWithString:uriString] NSURL* url = [NSURL URLWithString:uriString];
// Ensure URL is valid.
if (!url)
return nil;
return [[PhysicalWebDevice alloc] initWithURL:url
requestURL:nil requestURL:nil
icon:nil icon:nil
title:nil title:nil
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
'../../components/components.gyp:open_from_clipboard', '../../components/components.gyp:open_from_clipboard',
'../../components/components.gyp:password_manager_core_browser', '../../components/components.gyp:password_manager_core_browser',
'../../components/components.gyp:password_manager_sync_browser', '../../components/components.gyp:password_manager_sync_browser',
'../../components/components.gyp:physical_web_data_source',
'../../components/components.gyp:pref_registry', '../../components/components.gyp:pref_registry',
'../../components/components.gyp:profile_metrics', '../../components/components.gyp:profile_metrics',
'../../components/components.gyp:proxy_config', '../../components/components.gyp:proxy_config',
...@@ -453,6 +454,8 @@ ...@@ -453,6 +454,8 @@
'browser/passwords/passwords_ui_delegate.h', 'browser/passwords/passwords_ui_delegate.h',
'browser/passwords/update_password_infobar_controller.h', 'browser/passwords/update_password_infobar_controller.h',
'browser/passwords/update_password_infobar_controller.mm', 'browser/passwords/update_password_infobar_controller.mm',
'browser/physical_web/create_physical_web_data_source.h',
'browser/physical_web/create_physical_web_data_source.mm',
'browser/physical_web/physical_web_constants.h', 'browser/physical_web/physical_web_constants.h',
'browser/pref_names.cc', 'browser/pref_names.cc',
'browser/pref_names.h', 'browser/pref_names.h',
...@@ -791,6 +794,7 @@ ...@@ -791,6 +794,7 @@
'../../base/base.gyp:base', '../../base/base.gyp:base',
'../../components/components.gyp:version_info', '../../components/components.gyp:version_info',
'app_group_mainapp', 'app_group_mainapp',
'common/physical_web/physical_web.gyp:physical_web',
], ],
'link_settings': { 'link_settings': {
'libraries': [ 'libraries': [
......
...@@ -49,6 +49,7 @@ class TestingApplicationContext : public ApplicationContext { ...@@ -49,6 +49,7 @@ class TestingApplicationContext : public ApplicationContext {
component_updater::ComponentUpdateService* GetComponentUpdateService() component_updater::ComponentUpdateService* GetComponentUpdateService()
override; override;
CRLSetFetcher* GetCRLSetFetcher() override; CRLSetFetcher* GetCRLSetFetcher() override;
PhysicalWebDataSource* GetPhysicalWebDataSource() override;
private: private:
base::ThreadChecker thread_checker_; base::ThreadChecker thread_checker_;
......
...@@ -154,3 +154,8 @@ CRLSetFetcher* TestingApplicationContext::GetCRLSetFetcher() { ...@@ -154,3 +154,8 @@ CRLSetFetcher* TestingApplicationContext::GetCRLSetFetcher() {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
return nullptr; return nullptr;
} }
PhysicalWebDataSource* TestingApplicationContext::GetPhysicalWebDataSource() {
DCHECK(thread_checker_.CalledOnValidThread());
return nullptr;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment