Enable strict-virtual-specifiers for iOS builds.
This CL cleans up the remaining errors and enables the compile time check in common.gypi. BUG=417463 Review URL: https://codereview.chromium.org/840813009 Cr-Commit-Position: refs/heads/master@{#312269}
This commit is contained in:
base/message_loop
build
chrome/browser
metrics
variations
policy
components
enhanced_bookmarks
policy
core
sessions
signin
content/public/browser
ios
chrome
browser
suggestions
public
web
navigation
public
net
ui/gfx
@ -97,7 +97,7 @@ class BASE_EXPORT MessagePumpIOSForIO : public MessagePumpNSRunLoop {
|
||||
};
|
||||
|
||||
MessagePumpIOSForIO();
|
||||
virtual ~MessagePumpIOSForIO();
|
||||
~MessagePumpIOSForIO() override;
|
||||
|
||||
// Have the current thread's message loop watch for a a situation in which
|
||||
// reading/writing to the FD can be performed without blocking.
|
||||
|
@ -18,9 +18,9 @@ class MessagePumpIOSForIOTest : public testing::Test {
|
||||
MessagePumpIOSForIOTest()
|
||||
: ui_loop_(MessageLoop::TYPE_UI),
|
||||
io_thread_("MessagePumpIOSForIOTestIOThread") {}
|
||||
virtual ~MessagePumpIOSForIOTest() {}
|
||||
~MessagePumpIOSForIOTest() override {}
|
||||
|
||||
virtual void SetUp() override {
|
||||
void SetUp() override {
|
||||
Thread::Options options(MessageLoop::TYPE_IO, 0);
|
||||
ASSERT_TRUE(io_thread_.StartWithOptions(options));
|
||||
ASSERT_EQ(MessageLoop::TYPE_IO, io_thread_.message_loop()->type());
|
||||
@ -30,7 +30,7 @@ class MessagePumpIOSForIOTest : public testing::Test {
|
||||
ASSERT_EQ(0, ret);
|
||||
}
|
||||
|
||||
virtual void TearDown() override {
|
||||
void TearDown() override {
|
||||
if (IGNORE_EINTR(close(pipefds_[0])) < 0)
|
||||
PLOG(ERROR) << "close";
|
||||
if (IGNORE_EINTR(close(pipefds_[1])) < 0)
|
||||
@ -64,11 +64,11 @@ namespace {
|
||||
// nothing useful.
|
||||
class StupidWatcher : public MessagePumpIOSForIO::Watcher {
|
||||
public:
|
||||
virtual ~StupidWatcher() {}
|
||||
~StupidWatcher() override {}
|
||||
|
||||
// base:MessagePumpIOSForIO::Watcher interface
|
||||
virtual void OnFileCanReadWithoutBlocking(int fd) override {}
|
||||
virtual void OnFileCanWriteWithoutBlocking(int fd) override {}
|
||||
void OnFileCanReadWithoutBlocking(int fd) override {}
|
||||
void OnFileCanWriteWithoutBlocking(int fd) override {}
|
||||
};
|
||||
|
||||
#if GTEST_HAS_DEATH_TEST && !defined(NDEBUG)
|
||||
@ -93,16 +93,12 @@ class BaseWatcher : public MessagePumpIOSForIO::Watcher {
|
||||
: controller_(controller) {
|
||||
DCHECK(controller_);
|
||||
}
|
||||
virtual ~BaseWatcher() {}
|
||||
~BaseWatcher() override {}
|
||||
|
||||
// MessagePumpIOSForIO::Watcher interface
|
||||
virtual void OnFileCanReadWithoutBlocking(int /* fd */) override {
|
||||
NOTREACHED();
|
||||
}
|
||||
void OnFileCanReadWithoutBlocking(int /* fd */) override { NOTREACHED(); }
|
||||
|
||||
virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {
|
||||
NOTREACHED();
|
||||
}
|
||||
void OnFileCanWriteWithoutBlocking(int /* fd */) override { NOTREACHED(); }
|
||||
|
||||
protected:
|
||||
MessagePumpIOSForIO::FileDescriptorWatcher* controller_;
|
||||
@ -114,11 +110,9 @@ class DeleteWatcher : public BaseWatcher {
|
||||
MessagePumpIOSForIO::FileDescriptorWatcher* controller)
|
||||
: BaseWatcher(controller) {}
|
||||
|
||||
virtual ~DeleteWatcher() {
|
||||
DCHECK(!controller_);
|
||||
}
|
||||
~DeleteWatcher() override { DCHECK(!controller_); }
|
||||
|
||||
virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {
|
||||
void OnFileCanWriteWithoutBlocking(int /* fd */) override {
|
||||
DCHECK(controller_);
|
||||
delete controller_;
|
||||
controller_ = NULL;
|
||||
@ -146,9 +140,9 @@ class StopWatcher : public BaseWatcher {
|
||||
pump_(pump),
|
||||
fd_to_start_watching_(fd_to_start_watching) {}
|
||||
|
||||
virtual ~StopWatcher() {}
|
||||
~StopWatcher() override {}
|
||||
|
||||
virtual void OnFileCanWriteWithoutBlocking(int /* fd */) override {
|
||||
void OnFileCanWriteWithoutBlocking(int /* fd */) override {
|
||||
controller_->StopWatchingFileDescriptor();
|
||||
if (fd_to_start_watching_ >= 0) {
|
||||
pump_->WatchFileDescriptor(fd_to_start_watching_,
|
||||
|
@ -263,9 +263,9 @@ class BASE_EXPORT MessagePumpNSRunLoop : public MessagePumpCFRunLoopBase {
|
||||
class MessagePumpUIApplication : public MessagePumpCFRunLoopBase {
|
||||
public:
|
||||
MessagePumpUIApplication();
|
||||
virtual ~MessagePumpUIApplication();
|
||||
virtual void DoRun(Delegate* delegate) override;
|
||||
virtual void Quit() override;
|
||||
~MessagePumpUIApplication() override;
|
||||
void DoRun(Delegate* delegate) override;
|
||||
void Quit() override;
|
||||
|
||||
// This message pump can not spin the main message loop directly. Instead,
|
||||
// call |Attach()| to set up a delegate. It is an error to call |Run()|.
|
||||
|
@ -2140,7 +2140,7 @@
|
||||
'conditions': [
|
||||
# TODO(dcheng): https://crbug.com/417463 -- work to enable this flag
|
||||
# on all platforms is currently underway.
|
||||
['(OS=="linux" and chromeos==0) or OS=="mac"', {
|
||||
['(OS=="linux" and chromeos==0) or OS=="mac" or OS=="ios"', {
|
||||
'clang_chrome_plugins_flags': [
|
||||
'-Xclang',
|
||||
'-plugin-arg-find-bad-constructs',
|
||||
|
@ -20,12 +20,12 @@ class VariationsRequestSchedulerMobile : public VariationsRequestScheduler {
|
||||
// is the PrefService that contains the time of the last fetch.
|
||||
explicit VariationsRequestSchedulerMobile(const base::Closure& task,
|
||||
PrefService* local_state);
|
||||
virtual ~VariationsRequestSchedulerMobile();
|
||||
~VariationsRequestSchedulerMobile() override;
|
||||
|
||||
// Base class overrides.
|
||||
virtual void Start() override;
|
||||
virtual void Reset() override;
|
||||
virtual void OnAppEnterForeground() override;
|
||||
void Start() override;
|
||||
void Reset() override;
|
||||
void OnAppEnterForeground() override;
|
||||
|
||||
private:
|
||||
FRIEND_TEST_ALL_PREFIXES(VariationsRequestSchedulerMobileTest,
|
||||
|
@ -39,7 +39,7 @@ class UserPolicySigninService : public UserPolicySigninServiceBase {
|
||||
SigninManager* signin_manager,
|
||||
scoped_refptr<net::URLRequestContextGetter> system_request_context,
|
||||
ProfileOAuth2TokenService* token_service);
|
||||
virtual ~UserPolicySigninService();
|
||||
~UserPolicySigninService() override;
|
||||
|
||||
// Registers a CloudPolicyClient for fetching policy for |username|.
|
||||
// This requests an OAuth2 token for the services involved, and contacts
|
||||
@ -74,14 +74,14 @@ class UserPolicySigninService : public UserPolicySigninServiceBase {
|
||||
PolicyRegistrationCallback callback);
|
||||
|
||||
// KeyedService implementation:
|
||||
virtual void Shutdown() override;
|
||||
void Shutdown() override;
|
||||
|
||||
// CloudPolicyService::Observer implementation:
|
||||
virtual void OnInitializationCompleted(CloudPolicyService* service) override;
|
||||
void OnInitializationCompleted(CloudPolicyService* service) override;
|
||||
|
||||
// Overridden from UserPolicySigninServiceBase to cancel the pending delayed
|
||||
// registration.
|
||||
virtual void ShutdownUserCloudPolicyManager() override;
|
||||
void ShutdownUserCloudPolicyManager() override;
|
||||
|
||||
// Registers for cloud policy for an already signed-in user.
|
||||
void RegisterCloudPolicyService();
|
||||
|
@ -16,16 +16,14 @@ class RefCountedNSDataMemory : public base::RefCountedMemory {
|
||||
public:
|
||||
explicit RefCountedNSDataMemory(NSData* memory) : data_([memory retain]) {}
|
||||
|
||||
virtual const unsigned char* front() const override {
|
||||
const unsigned char* front() const override {
|
||||
return reinterpret_cast<const unsigned char*>([data_ bytes]);
|
||||
}
|
||||
|
||||
virtual size_t size() const override {
|
||||
return [data_ length];
|
||||
}
|
||||
size_t size() const override { return [data_ length]; }
|
||||
|
||||
private:
|
||||
virtual ~RefCountedNSDataMemory() {}
|
||||
~RefCountedNSDataMemory() override {}
|
||||
|
||||
base::scoped_nsobject<NSData> data_;
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCountedNSDataMemory);
|
||||
|
@ -27,9 +27,9 @@ class POLICY_EXPORT BrowserPolicyConnectorIOS : public BrowserPolicyConnector {
|
||||
const std::string& user_agent,
|
||||
scoped_refptr<base::SequencedTaskRunner> background_task_runner);
|
||||
|
||||
virtual ~BrowserPolicyConnectorIOS();
|
||||
~BrowserPolicyConnectorIOS() override;
|
||||
|
||||
virtual void Init(
|
||||
void Init(
|
||||
PrefService* local_state,
|
||||
scoped_refptr<net::URLRequestContextGetter> request_context) override;
|
||||
|
||||
|
@ -22,17 +22,15 @@ class DeviceManagementServiceConfiguration
|
||||
explicit DeviceManagementServiceConfiguration(const std::string& user_agent)
|
||||
: user_agent_(user_agent) {}
|
||||
|
||||
virtual ~DeviceManagementServiceConfiguration() {}
|
||||
~DeviceManagementServiceConfiguration() override {}
|
||||
|
||||
virtual std::string GetServerUrl() override {
|
||||
std::string GetServerUrl() override {
|
||||
return BrowserPolicyConnector::GetDeviceManagementUrl();
|
||||
}
|
||||
|
||||
virtual std::string GetAgentParameter() override {
|
||||
return user_agent_;
|
||||
}
|
||||
std::string GetAgentParameter() override { return user_agent_; }
|
||||
|
||||
virtual std::string GetPlatformParameter() override {
|
||||
std::string GetPlatformParameter() override {
|
||||
std::string os_name = base::SysInfo::OperatingSystemName();
|
||||
std::string os_hardware = base::SysInfo::OperatingSystemArchitecture();
|
||||
std::string os_version("-");
|
||||
|
@ -20,12 +20,12 @@ class POLICY_EXPORT PolicyLoaderIOS : public AsyncPolicyLoader {
|
||||
public:
|
||||
explicit PolicyLoaderIOS(
|
||||
scoped_refptr<base::SequencedTaskRunner> task_runner);
|
||||
virtual ~PolicyLoaderIOS();
|
||||
~PolicyLoaderIOS() override;
|
||||
|
||||
// AsyncPolicyLoader implementation.
|
||||
virtual void InitOnBackgroundThread() override;
|
||||
virtual scoped_ptr<PolicyBundle> Load() override;
|
||||
virtual base::Time LastModificationTime() override;
|
||||
void InitOnBackgroundThread() override;
|
||||
scoped_ptr<PolicyBundle> Load() override;
|
||||
base::Time LastModificationTime() override;
|
||||
|
||||
private:
|
||||
void UserDefaultsChanged();
|
||||
|
@ -31,25 +31,24 @@ class TestHarness : public PolicyProviderTestHarness {
|
||||
// If |use_encoded_key| is true then AddPolicies() serializes and encodes
|
||||
// the policies, and publishes them under the EncodedChromePolicy key.
|
||||
explicit TestHarness(bool use_encoded_key);
|
||||
virtual ~TestHarness();
|
||||
~TestHarness() override;
|
||||
|
||||
virtual void SetUp() override;
|
||||
void SetUp() override;
|
||||
|
||||
virtual ConfigurationPolicyProvider* CreateProvider(
|
||||
ConfigurationPolicyProvider* CreateProvider(
|
||||
SchemaRegistry* registry,
|
||||
scoped_refptr<base::SequencedTaskRunner> task_runner) override;
|
||||
|
||||
virtual void InstallEmptyPolicy() override;
|
||||
virtual void InstallStringPolicy(const std::string& policy_name,
|
||||
const std::string& policy_value) override;
|
||||
virtual void InstallIntegerPolicy(const std::string& policy_name,
|
||||
int policy_value) override;
|
||||
virtual void InstallBooleanPolicy(const std::string& policy_name,
|
||||
bool policy_value) override;
|
||||
virtual void InstallStringListPolicy(
|
||||
const std::string& policy_name,
|
||||
const base::ListValue* policy_value) override;
|
||||
virtual void InstallDictionaryPolicy(
|
||||
void InstallEmptyPolicy() override;
|
||||
void InstallStringPolicy(const std::string& policy_name,
|
||||
const std::string& policy_value) override;
|
||||
void InstallIntegerPolicy(const std::string& policy_name,
|
||||
int policy_value) override;
|
||||
void InstallBooleanPolicy(const std::string& policy_name,
|
||||
bool policy_value) override;
|
||||
void InstallStringListPolicy(const std::string& policy_name,
|
||||
const base::ListValue* policy_value) override;
|
||||
void InstallDictionaryPolicy(
|
||||
const std::string& policy_name,
|
||||
const base::DictionaryValue* policy_value) override;
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace sessions {
|
||||
class IOSSerializedNavigationDriver
|
||||
: public SerializedNavigationDriver {
|
||||
public:
|
||||
virtual ~IOSSerializedNavigationDriver();
|
||||
~IOSSerializedNavigationDriver() override;
|
||||
|
||||
// Returns the singleton IOSSerializedNavigationDriver. Almost all
|
||||
// callers should use SerializedNavigationDriver::Get() instead.
|
||||
|
@ -66,7 +66,7 @@ class TestSigninClient : public SigninClient {
|
||||
void SetURLRequestContext(net::URLRequestContextGetter* request_context);
|
||||
|
||||
#if defined(OS_IOS)
|
||||
virtual ios::ProfileOAuth2TokenServiceIOSProvider* GetIOSProvider() override;
|
||||
ios::ProfileOAuth2TokenServiceIOSProvider* GetIOSProvider() override;
|
||||
#endif
|
||||
|
||||
// Returns true.
|
||||
|
@ -37,14 +37,14 @@ class OAuth2TokenServiceObserverBridge : public OAuth2TokenService::Observer {
|
||||
OAuth2TokenServiceObserverBridge(
|
||||
OAuth2TokenService* token_service,
|
||||
id<OAuth2TokenServiceObserverBridgeDelegate> delegate);
|
||||
virtual ~OAuth2TokenServiceObserverBridge();
|
||||
~OAuth2TokenServiceObserverBridge() override;
|
||||
|
||||
// OAuth2TokenService::Observer
|
||||
virtual void OnRefreshTokenAvailable(const std::string& account_id) override;
|
||||
virtual void OnRefreshTokenRevoked(const std::string& account_id) override;
|
||||
virtual void OnRefreshTokensLoaded() override;
|
||||
virtual void OnStartBatchChanges() override;
|
||||
virtual void OnEndBatchChanges() override;
|
||||
void OnRefreshTokenAvailable(const std::string& account_id) override;
|
||||
void OnRefreshTokenRevoked(const std::string& account_id) override;
|
||||
void OnRefreshTokensLoaded() override;
|
||||
void OnStartBatchChanges() override;
|
||||
void OnEndBatchChanges() override;
|
||||
|
||||
private:
|
||||
OAuth2TokenService* token_service_; // weak
|
||||
|
@ -28,34 +28,32 @@ class ProfileOAuth2TokenServiceIOSProvider;
|
||||
class ProfileOAuth2TokenServiceIOS : public ProfileOAuth2TokenService {
|
||||
public:
|
||||
// KeyedService
|
||||
virtual void Shutdown() override;
|
||||
void Shutdown() override;
|
||||
|
||||
// OAuth2TokenService
|
||||
virtual bool RefreshTokenIsAvailable(
|
||||
const std::string& account_id) const override;
|
||||
bool RefreshTokenIsAvailable(const std::string& account_id) const override;
|
||||
|
||||
virtual void InvalidateOAuth2Token(const std::string& account_id,
|
||||
const std::string& client_id,
|
||||
const ScopeSet& scopes,
|
||||
const std::string& access_token) override;
|
||||
void InvalidateOAuth2Token(const std::string& account_id,
|
||||
const std::string& client_id,
|
||||
const ScopeSet& scopes,
|
||||
const std::string& access_token) override;
|
||||
|
||||
// ProfileOAuth2TokenService
|
||||
virtual void Initialize(
|
||||
SigninClient* client,
|
||||
SigninErrorController* signin_error_controller) override;
|
||||
virtual void LoadCredentials(const std::string& primary_account_id) override;
|
||||
virtual std::vector<std::string> GetAccounts() override;
|
||||
virtual void UpdateAuthError(const std::string& account_id,
|
||||
const GoogleServiceAuthError& error) override;
|
||||
void Initialize(SigninClient* client,
|
||||
SigninErrorController* signin_error_controller) override;
|
||||
void LoadCredentials(const std::string& primary_account_id) override;
|
||||
std::vector<std::string> GetAccounts() override;
|
||||
void UpdateAuthError(const std::string& account_id,
|
||||
const GoogleServiceAuthError& error) override;
|
||||
|
||||
// This method should not be called when using shared authentication.
|
||||
virtual void UpdateCredentials(const std::string& account_id,
|
||||
const std::string& refresh_token) override;
|
||||
void UpdateCredentials(const std::string& account_id,
|
||||
const std::string& refresh_token) override;
|
||||
|
||||
// Removes all credentials from this instance of |ProfileOAuth2TokenService|,
|
||||
// however, it does not revoke the identities from the device.
|
||||
// Subsequent calls to |RefreshTokenIsAvailable| will return |false|.
|
||||
virtual void RevokeAllCredentials() override;
|
||||
void RevokeAllCredentials() override;
|
||||
|
||||
// Reloads accounts from the provider. Fires |OnRefreshTokenAvailable| for
|
||||
// each new account. Fires |OnRefreshTokenRevoked| for each account that was
|
||||
@ -67,9 +65,9 @@ class ProfileOAuth2TokenServiceIOS : public ProfileOAuth2TokenService {
|
||||
friend class ProfileOAuth2TokenServiceIOSTest;
|
||||
|
||||
ProfileOAuth2TokenServiceIOS();
|
||||
virtual ~ProfileOAuth2TokenServiceIOS();
|
||||
~ProfileOAuth2TokenServiceIOS() override;
|
||||
|
||||
virtual OAuth2AccessTokenFetcher* CreateAccessTokenFetcher(
|
||||
OAuth2AccessTokenFetcher* CreateAccessTokenFetcher(
|
||||
const std::string& account_id,
|
||||
net::URLRequestContextGetter* getter,
|
||||
OAuth2AccessTokenConsumer* consumer) override;
|
||||
@ -90,14 +88,14 @@ class ProfileOAuth2TokenServiceIOS : public ProfileOAuth2TokenService {
|
||||
public:
|
||||
AccountInfo(SigninErrorController* signin_error_controller,
|
||||
const std::string& account_id);
|
||||
virtual ~AccountInfo();
|
||||
~AccountInfo() override;
|
||||
|
||||
void SetLastAuthError(const GoogleServiceAuthError& error);
|
||||
|
||||
// SigninErrorController::AuthStatusProvider implementation.
|
||||
virtual std::string GetAccountId() const override;
|
||||
virtual std::string GetUsername() const override;
|
||||
virtual GoogleServiceAuthError GetAuthStatus() const override;
|
||||
std::string GetAccountId() const override;
|
||||
std::string GetUsername() const override;
|
||||
GoogleServiceAuthError GetAuthStatus() const override;
|
||||
|
||||
private:
|
||||
SigninErrorController* signin_error_controller_;
|
||||
|
@ -61,13 +61,13 @@ class SSOAccessTokenFetcher : public OAuth2AccessTokenFetcher {
|
||||
SSOAccessTokenFetcher(OAuth2AccessTokenConsumer* consumer,
|
||||
ios::ProfileOAuth2TokenServiceIOSProvider* provider,
|
||||
const std::string account_id);
|
||||
virtual ~SSOAccessTokenFetcher();
|
||||
~SSOAccessTokenFetcher() override;
|
||||
|
||||
virtual void Start(const std::string& client_id,
|
||||
const std::string& client_secret,
|
||||
const std::vector<std::string>& scopes) override;
|
||||
void Start(const std::string& client_id,
|
||||
const std::string& client_secret,
|
||||
const std::vector<std::string>& scopes) override;
|
||||
|
||||
virtual void CancelRequest() override;
|
||||
void CancelRequest() override;
|
||||
|
||||
// Handles an access token response.
|
||||
void OnAccessTokenResponse(NSString* token,
|
||||
|
@ -32,12 +32,10 @@ class AppCacheService;
|
||||
// the UI thread. It must be destructed on the IO thread.
|
||||
class CONTENT_EXPORT ResourceContext : public base::SupportsUserData {
|
||||
public:
|
||||
#if defined(OS_IOS)
|
||||
virtual ~ResourceContext() {}
|
||||
#else
|
||||
#if !defined(OS_IOS)
|
||||
ResourceContext();
|
||||
~ResourceContext() override;
|
||||
#endif
|
||||
~ResourceContext() override;
|
||||
virtual net::HostResolver* GetHostResolver() = 0;
|
||||
|
||||
// DEPRECATED: This is no longer a valid given isolated apps/sites and
|
||||
|
@ -33,7 +33,7 @@ class SuggestionsServiceFactory : public BrowserStateKeyedServiceFactory {
|
||||
friend struct DefaultSingletonTraits<SuggestionsServiceFactory>;
|
||||
|
||||
SuggestionsServiceFactory();
|
||||
~SuggestionsServiceFactory();
|
||||
~SuggestionsServiceFactory() override;
|
||||
|
||||
// BrowserStateKeyedServiceFactory:
|
||||
KeyedService* BuildServiceInstanceFor(
|
||||
|
@ -19,20 +19,20 @@ class FakeProfileOAuth2TokenServiceIOSProvider
|
||||
: public ProfileOAuth2TokenServiceIOSProvider {
|
||||
public:
|
||||
FakeProfileOAuth2TokenServiceIOSProvider();
|
||||
virtual ~FakeProfileOAuth2TokenServiceIOSProvider();
|
||||
~FakeProfileOAuth2TokenServiceIOSProvider() override;
|
||||
|
||||
// ProfileOAuth2TokenServiceIOSProvider
|
||||
virtual void InitializeSharedAuthentication() override;
|
||||
void InitializeSharedAuthentication() override;
|
||||
|
||||
virtual void GetAccessToken(const std::string& account_id,
|
||||
const std::string& client_id,
|
||||
const std::string& client_secret,
|
||||
const std::set<std::string>& scopes,
|
||||
const AccessTokenCallback& callback) override;
|
||||
void GetAccessToken(const std::string& account_id,
|
||||
const std::string& client_id,
|
||||
const std::string& client_secret,
|
||||
const std::set<std::string>& scopes,
|
||||
const AccessTokenCallback& callback) override;
|
||||
|
||||
virtual std::vector<std::string> GetAllAccountIds() override;
|
||||
std::vector<std::string> GetAllAccountIds() override;
|
||||
|
||||
virtual AuthenticationErrorCategory GetAuthenticationErrorCategory(
|
||||
AuthenticationErrorCategory GetAuthenticationErrorCategory(
|
||||
NSError* error) const override;
|
||||
|
||||
// Methods to configure this fake provider.
|
||||
|
@ -16,7 +16,7 @@ class FakeStringProvider;
|
||||
class TestChromeBrowserProvider : public ChromeBrowserProvider {
|
||||
public:
|
||||
TestChromeBrowserProvider();
|
||||
virtual ~TestChromeBrowserProvider();
|
||||
~TestChromeBrowserProvider() override;
|
||||
|
||||
// Returns the current provider as a |TestChromeBrowserProvider|.
|
||||
static TestChromeBrowserProvider* GetTestProvider();
|
||||
|
@ -21,30 +21,30 @@ class NavigationItemImpl : public web::NavigationItem {
|
||||
public:
|
||||
// Creates a default NavigationItemImpl.
|
||||
NavigationItemImpl();
|
||||
virtual ~NavigationItemImpl();
|
||||
~NavigationItemImpl() override;
|
||||
|
||||
// NavigationItem implementation:
|
||||
virtual int GetUniqueID() const override;
|
||||
virtual void SetURL(const GURL& url) override;
|
||||
virtual const GURL& GetURL() const override;
|
||||
virtual void SetReferrer(const web::Referrer& referrer) override;
|
||||
virtual const web::Referrer& GetReferrer() const override;
|
||||
virtual void SetVirtualURL(const GURL& url) override;
|
||||
virtual const GURL& GetVirtualURL() const override;
|
||||
virtual void SetTitle(const base::string16& title) override;
|
||||
virtual const base::string16& GetTitle() const override;
|
||||
virtual void SetPageID(int page_id) override;
|
||||
virtual int32 GetPageID() const override;
|
||||
virtual const base::string16& GetTitleForDisplay(
|
||||
int GetUniqueID() const override;
|
||||
void SetURL(const GURL& url) override;
|
||||
const GURL& GetURL() const override;
|
||||
void SetReferrer(const web::Referrer& referrer) override;
|
||||
const web::Referrer& GetReferrer() const override;
|
||||
void SetVirtualURL(const GURL& url) override;
|
||||
const GURL& GetVirtualURL() const override;
|
||||
void SetTitle(const base::string16& title) override;
|
||||
const base::string16& GetTitle() const override;
|
||||
void SetPageID(int page_id) override;
|
||||
int32 GetPageID() const override;
|
||||
const base::string16& GetTitleForDisplay(
|
||||
const std::string& languages) const override;
|
||||
virtual void SetTransitionType(ui::PageTransition transition_type) override;
|
||||
virtual ui::PageTransition GetTransitionType() const override;
|
||||
virtual const FaviconStatus& GetFavicon() const override;
|
||||
virtual FaviconStatus& GetFavicon() override;
|
||||
virtual const SSLStatus& GetSSL() const override;
|
||||
virtual SSLStatus& GetSSL() override;
|
||||
virtual void SetTimestamp(base::Time timestamp) override;
|
||||
virtual base::Time GetTimestamp() const override;
|
||||
void SetTransitionType(ui::PageTransition transition_type) override;
|
||||
ui::PageTransition GetTransitionType() const override;
|
||||
const FaviconStatus& GetFavicon() const override;
|
||||
FaviconStatus& GetFavicon() override;
|
||||
const SSLStatus& GetSSL() const override;
|
||||
SSLStatus& GetSSL() override;
|
||||
void SetTimestamp(base::Time timestamp) override;
|
||||
base::Time GetTimestamp() const override;
|
||||
|
||||
private:
|
||||
int unique_id_;
|
||||
|
@ -15,9 +15,7 @@ namespace {
|
||||
|
||||
class NavigationItemTest : public PlatformTest {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
item_.reset(new NavigationItemImpl());
|
||||
}
|
||||
void SetUp() override { item_.reset(new NavigationItemImpl()); }
|
||||
|
||||
scoped_ptr<NavigationItemImpl> item_;
|
||||
};
|
||||
|
@ -16,22 +16,21 @@ namespace web {
|
||||
class TestWebState : public WebState {
|
||||
public:
|
||||
// WebState implementation.
|
||||
virtual BrowserState* GetBrowserState() const override;
|
||||
virtual void OpenURL(const OpenURLParams& params) override {}
|
||||
virtual NavigationManager* GetNavigationManager() override;
|
||||
virtual CRWJSInjectionReceiver* GetJSInjectionReceiver() const override;
|
||||
virtual const std::string& GetContentsMimeType() const override;
|
||||
virtual const std::string& GetContentLanguageHeader() const override;
|
||||
virtual bool ContentIsHTML() const override;
|
||||
virtual const GURL& GetVisibleURL() const override;
|
||||
virtual const GURL& GetLastCommittedURL() const override;
|
||||
virtual void AddScriptCommandCallback(
|
||||
const ScriptCommandCallback& callback,
|
||||
const std::string& command_prefix) override {}
|
||||
virtual void RemoveScriptCommandCallback(
|
||||
const std::string& command_prefix) override {}
|
||||
virtual void AddObserver(WebStateObserver* observer) override {}
|
||||
virtual void RemoveObserver(WebStateObserver* observer) override {}
|
||||
BrowserState* GetBrowserState() const override;
|
||||
void OpenURL(const OpenURLParams& params) override {}
|
||||
NavigationManager* GetNavigationManager() override;
|
||||
CRWJSInjectionReceiver* GetJSInjectionReceiver() const override;
|
||||
const std::string& GetContentsMimeType() const override;
|
||||
const std::string& GetContentLanguageHeader() const override;
|
||||
bool ContentIsHTML() const override;
|
||||
const GURL& GetVisibleURL() const override;
|
||||
const GURL& GetLastCommittedURL() const override;
|
||||
void AddScriptCommandCallback(const ScriptCommandCallback& callback,
|
||||
const std::string& command_prefix) override {}
|
||||
void RemoveScriptCommandCallback(const std::string& command_prefix) override {
|
||||
}
|
||||
void AddObserver(WebStateObserver* observer) override {}
|
||||
void RemoveObserver(WebStateObserver* observer) override {}
|
||||
|
||||
private:
|
||||
GURL url_;
|
||||
|
@ -59,7 +59,7 @@ class WebState : public base::SupportsUserData {
|
||||
bool is_renderer_initiated;
|
||||
};
|
||||
|
||||
virtual ~WebState() {}
|
||||
~WebState() override {}
|
||||
|
||||
// Gets the BrowserState associated with this WebState. Can never return null.
|
||||
virtual BrowserState* GetBrowserState() const = 0;
|
||||
|
@ -47,7 +47,7 @@ class FileBackgroundIO : public disk_cache::BackgroundIO {
|
||||
void Write();
|
||||
|
||||
private:
|
||||
virtual ~FileBackgroundIO() {}
|
||||
~FileBackgroundIO() override {}
|
||||
|
||||
disk_cache::FileIOCallback* callback_;
|
||||
|
||||
@ -64,7 +64,7 @@ class FileBackgroundIO : public disk_cache::BackgroundIO {
|
||||
class FileInFlightIO : public disk_cache::InFlightIO {
|
||||
public:
|
||||
FileInFlightIO() {}
|
||||
virtual ~FileInFlightIO() {}
|
||||
~FileInFlightIO() override {}
|
||||
|
||||
// These methods start an asynchronous operation. The arguments have the same
|
||||
// semantics of the File asynchronous operations, with the exception that the
|
||||
@ -79,8 +79,8 @@ class FileInFlightIO : public disk_cache::InFlightIO {
|
||||
// |cancel| is true if the actual task posted to the thread is still
|
||||
// queued (because we are inside WaitForPendingIO), and false if said task is
|
||||
// the one performing the call.
|
||||
virtual void OnOperationComplete(disk_cache::BackgroundIO* operation,
|
||||
bool cancel) override;
|
||||
void OnOperationComplete(disk_cache::BackgroundIO* operation,
|
||||
bool cancel) override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(FileInFlightIO);
|
||||
|
@ -13,7 +13,7 @@ class ProxyConfigServiceIOS : public PollingProxyConfigService {
|
||||
public:
|
||||
// Constructs a ProxyConfigService that watches the iOS system proxy settings.
|
||||
explicit ProxyConfigServiceIOS();
|
||||
virtual ~ProxyConfigServiceIOS();
|
||||
~ProxyConfigServiceIOS() override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceIOS);
|
||||
|
@ -288,22 +288,16 @@ class ImageRepCocoaTouch : public ImageRep {
|
||||
CHECK(image);
|
||||
}
|
||||
|
||||
virtual ~ImageRepCocoaTouch() {
|
||||
~ImageRepCocoaTouch() override {
|
||||
base::mac::NSObjectRelease(image_);
|
||||
image_ = nil;
|
||||
}
|
||||
|
||||
virtual int Width() const override {
|
||||
return Size().width();
|
||||
}
|
||||
int Width() const override { return Size().width(); }
|
||||
|
||||
virtual int Height() const override {
|
||||
return Size().height();
|
||||
}
|
||||
int Height() const override { return Size().height(); }
|
||||
|
||||
virtual gfx::Size Size() const override {
|
||||
return internal::UIImageSize(image_);
|
||||
}
|
||||
gfx::Size Size() const override { return internal::UIImageSize(image_); }
|
||||
|
||||
UIImage* image() const { return image_; }
|
||||
|
||||
|
@ -46,13 +46,13 @@ UIImage* UIImageWithSizeAndScale(CGFloat width, CGFloat height, CGFloat scale) {
|
||||
class ImageIOSTest : public testing::Test {
|
||||
public:
|
||||
ImageIOSTest() {}
|
||||
virtual ~ImageIOSTest() {}
|
||||
~ImageIOSTest() override {}
|
||||
|
||||
virtual void SetUp() override {
|
||||
void SetUp() override {
|
||||
original_scale_factors_ = gfx::ImageSkia::GetSupportedScales();
|
||||
}
|
||||
|
||||
virtual void TearDown() override {
|
||||
void TearDown() override {
|
||||
gfx::ImageSkia::SetSupportedScales(original_scale_factors_);
|
||||
}
|
||||
|
||||
|
@ -17,21 +17,21 @@ class PlatformFontIOS : public PlatformFont {
|
||||
int font_size);
|
||||
|
||||
// Overridden from PlatformFont:
|
||||
virtual Font DeriveFont(int size_delta, int style) const override;
|
||||
virtual int GetHeight() const override;
|
||||
virtual int GetBaseline() const override;
|
||||
virtual int GetCapHeight() const override;
|
||||
virtual int GetExpectedTextWidth(int length) const override;
|
||||
virtual int GetStyle() const override;
|
||||
virtual std::string GetFontName() const override;
|
||||
virtual std::string GetActualFontNameForTesting() const override;
|
||||
virtual int GetFontSize() const override;
|
||||
virtual const FontRenderParams& GetFontRenderParams() override;
|
||||
virtual NativeFont GetNativeFont() const override;
|
||||
Font DeriveFont(int size_delta, int style) const override;
|
||||
int GetHeight() const override;
|
||||
int GetBaseline() const override;
|
||||
int GetCapHeight() const override;
|
||||
int GetExpectedTextWidth(int length) const override;
|
||||
int GetStyle() const override;
|
||||
std::string GetFontName() const override;
|
||||
std::string GetActualFontNameForTesting() const override;
|
||||
int GetFontSize() const override;
|
||||
const FontRenderParams& GetFontRenderParams() override;
|
||||
NativeFont GetNativeFont() const override;
|
||||
|
||||
private:
|
||||
PlatformFontIOS(const std::string& font_name, int font_size, int style);
|
||||
virtual ~PlatformFontIOS() {}
|
||||
~PlatformFontIOS() override {}
|
||||
|
||||
// Initialize the object with the specified parameters.
|
||||
void InitWithNameSizeAndStyle(const std::string& font_name,
|
||||
|
@ -12,23 +12,22 @@
|
||||
namespace {
|
||||
|
||||
class ScreenIos : public gfx::Screen {
|
||||
virtual gfx::Point GetCursorScreenPoint() override {
|
||||
gfx::Point GetCursorScreenPoint() override {
|
||||
NOTIMPLEMENTED();
|
||||
return gfx::Point(0, 0);
|
||||
}
|
||||
|
||||
virtual gfx::NativeWindow GetWindowUnderCursor() override {
|
||||
gfx::NativeWindow GetWindowUnderCursor() override {
|
||||
NOTIMPLEMENTED();
|
||||
return gfx::NativeWindow();
|
||||
}
|
||||
|
||||
virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point)
|
||||
override {
|
||||
gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override {
|
||||
NOTIMPLEMENTED();
|
||||
return gfx::NativeWindow();
|
||||
}
|
||||
|
||||
virtual int GetNumDisplays() const override {
|
||||
int GetNumDisplays() const override {
|
||||
#if TARGET_IPHONE_SIMULATOR
|
||||
// UIScreen does not reliably return correct results on the simulator.
|
||||
return 1;
|
||||
@ -37,34 +36,31 @@ class ScreenIos : public gfx::Screen {
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual std::vector<gfx::Display> GetAllDisplays() const override {
|
||||
std::vector<gfx::Display> GetAllDisplays() const override {
|
||||
NOTIMPLEMENTED();
|
||||
return std::vector<gfx::Display>(1, GetPrimaryDisplay());
|
||||
}
|
||||
|
||||
// Returns the display nearest the specified window.
|
||||
virtual gfx::Display GetDisplayNearestWindow(
|
||||
gfx::NativeView view) const override {
|
||||
gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override {
|
||||
NOTIMPLEMENTED();
|
||||
return gfx::Display();
|
||||
}
|
||||
|
||||
// Returns the the display nearest the specified point.
|
||||
virtual gfx::Display GetDisplayNearestPoint(
|
||||
const gfx::Point& point) const override {
|
||||
gfx::Display GetDisplayNearestPoint(const gfx::Point& point) const override {
|
||||
NOTIMPLEMENTED();
|
||||
return gfx::Display();
|
||||
}
|
||||
|
||||
// Returns the display that most closely intersects the provided bounds.
|
||||
virtual gfx::Display GetDisplayMatching(
|
||||
const gfx::Rect& match_rect) const override {
|
||||
gfx::Display GetDisplayMatching(const gfx::Rect& match_rect) const override {
|
||||
NOTIMPLEMENTED();
|
||||
return gfx::Display();
|
||||
}
|
||||
|
||||
// Returns the primary display.
|
||||
virtual gfx::Display GetPrimaryDisplay() const override {
|
||||
gfx::Display GetPrimaryDisplay() const override {
|
||||
UIScreen* mainScreen = [UIScreen mainScreen];
|
||||
CHECK(mainScreen);
|
||||
gfx::Display display(0, gfx::Rect(mainScreen.bounds));
|
||||
@ -72,11 +68,11 @@ class ScreenIos : public gfx::Screen {
|
||||
return display;
|
||||
}
|
||||
|
||||
virtual void AddObserver(gfx::DisplayObserver* observer) override {
|
||||
void AddObserver(gfx::DisplayObserver* observer) override {
|
||||
// no display change on iOS.
|
||||
}
|
||||
|
||||
virtual void RemoveObserver(gfx::DisplayObserver* observer) override {
|
||||
void RemoveObserver(gfx::DisplayObserver* observer) override {
|
||||
// no display change on iOS.
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user