Commit 1fd71638 authored by dcheng's avatar dcheng Committed by Commit bot

Standardize usage of virtual/override/final in chrome/browser/profiles/

The Google C++ style guide states:

  Explicitly annotate overrides of virtual functions or virtual
  destructors with an override or (less frequently) final specifier.
  Older (pre-C++11) code will use the virtual keyword as an inferior
  alternative annotation. For clarity, use exactly one of override,
  final, or virtual when declaring an override.

To better conform to these guidelines, the following constructs have
been rewritten:

- if a base class has a virtual destructor, then:
    virtual ~Foo();                   ->  ~Foo() override;
- virtual void Foo() override;        ->  void Foo() override;
- virtual void Foo() override final;  ->  void Foo() final;

This patch was automatically generated. The clang plugin can generate
fixit hints, which are suggested edits when it is 100% sure it knows how
to fix a problem. The hints from the clang plugin were applied to the
source tree using the tool in https://codereview.chromium.org/598073004.

BUG=417463
R=erg@chromium.org

Review URL: https://codereview.chromium.org/654223009

Cr-Commit-Position: refs/heads/master@{#300734}
parent a1aa3518
...@@ -87,7 +87,7 @@ class AvatarMenu : ...@@ -87,7 +87,7 @@ class AvatarMenu :
AvatarMenu(ProfileInfoInterface* profile_cache, AvatarMenu(ProfileInfoInterface* profile_cache,
AvatarMenuObserver* observer, AvatarMenuObserver* observer,
Browser* browser); Browser* browser);
virtual ~AvatarMenu(); ~AvatarMenu() override;
// True if avatar menu should be displayed. // True if avatar menu should be displayed.
static bool ShouldShowAvatarMenu(); static bool ShouldShowAvatarMenu();
...@@ -147,14 +147,14 @@ class AvatarMenu : ...@@ -147,14 +147,14 @@ class AvatarMenu :
bool ShouldShowEditProfileLink() const; bool ShouldShowEditProfileLink() const;
// content::NotificationObserver: // content::NotificationObserver:
virtual void Observe(int type, void Observe(int type,
const content::NotificationSource& source, const content::NotificationSource& source,
const content::NotificationDetails& details) override; const content::NotificationDetails& details) override;
private: private:
#if defined(ENABLE_MANAGED_USERS) #if defined(ENABLE_MANAGED_USERS)
// SupervisedUserServiceObserver: // SupervisedUserServiceObserver:
virtual void OnCustodianInfoChanged() override; void OnCustodianInfoChanged() override;
#endif #endif
// The model that provides the list of menu items. // The model that provides the list of menu items.
......
...@@ -16,14 +16,14 @@ class Profile; ...@@ -16,14 +16,14 @@ class Profile;
class AvatarMenuActionsDesktop : public AvatarMenuActions { class AvatarMenuActionsDesktop : public AvatarMenuActions {
public: public:
AvatarMenuActionsDesktop(); AvatarMenuActionsDesktop();
virtual ~AvatarMenuActionsDesktop(); ~AvatarMenuActionsDesktop() override;
// AvatarMenuActions overrides: // AvatarMenuActions overrides:
virtual void AddNewProfile(ProfileMetrics::ProfileAdd type) override; void AddNewProfile(ProfileMetrics::ProfileAdd type) override;
virtual void EditProfile(Profile* profile, size_t index) override; void EditProfile(Profile* profile, size_t index) override;
virtual bool ShouldShowAddNewProfileLink() const override; bool ShouldShowAddNewProfileLink() const override;
virtual bool ShouldShowEditProfileLink() const override; bool ShouldShowEditProfileLink() const override;
virtual void ActiveBrowserChanged(Browser* browser) override; void ActiveBrowserChanged(Browser* browser) override;
private: private:
// Browser in which this avatar menu resides. Weak. // Browser in which this avatar menu resides. Weak.
......
...@@ -16,10 +16,9 @@ class BookmarkModelLoadedObserver : public BaseBookmarkModelObserver { ...@@ -16,10 +16,9 @@ class BookmarkModelLoadedObserver : public BaseBookmarkModelObserver {
explicit BookmarkModelLoadedObserver(Profile* profile); explicit BookmarkModelLoadedObserver(Profile* profile);
private: private:
virtual void BookmarkModelChanged() override; void BookmarkModelChanged() override;
virtual void BookmarkModelLoaded(BookmarkModel* model, void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override;
bool ids_reassigned) override; void BookmarkModelBeingDeleted(BookmarkModel* model) override;
virtual void BookmarkModelBeingDeleted(BookmarkModel* model) override;
Profile* profile_; Profile* profile_;
......
...@@ -18,7 +18,7 @@ void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts); ...@@ -18,7 +18,7 @@ void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts);
class ChromeBrowserMainExtraPartsProfiles : public ChromeBrowserMainExtraParts { class ChromeBrowserMainExtraPartsProfiles : public ChromeBrowserMainExtraParts {
public: public:
ChromeBrowserMainExtraPartsProfiles(); ChromeBrowserMainExtraPartsProfiles();
virtual ~ChromeBrowserMainExtraPartsProfiles(); ~ChromeBrowserMainExtraPartsProfiles() override;
// Instantiates all chrome KeyedService factories, which is // Instantiates all chrome KeyedService factories, which is
// especially important for services that should be created at profile // especially important for services that should be created at profile
...@@ -26,7 +26,7 @@ class ChromeBrowserMainExtraPartsProfiles : public ChromeBrowserMainExtraParts { ...@@ -26,7 +26,7 @@ class ChromeBrowserMainExtraPartsProfiles : public ChromeBrowserMainExtraParts {
static void EnsureBrowserContextKeyedServiceFactoriesBuilt(); static void EnsureBrowserContextKeyedServiceFactoriesBuilt();
// Overridden from ChromeBrowserMainExtraParts: // Overridden from ChromeBrowserMainExtraParts:
virtual void PreProfileInit() override; void PreProfileInit() override;
private: private:
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsProfiles); DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsProfiles);
......
...@@ -24,7 +24,7 @@ class GAIAInfoUpdateService : public KeyedService, ...@@ -24,7 +24,7 @@ class GAIAInfoUpdateService : public KeyedService,
public SigninManagerBase::Observer { public SigninManagerBase::Observer {
public: public:
explicit GAIAInfoUpdateService(Profile* profile); explicit GAIAInfoUpdateService(Profile* profile);
virtual ~GAIAInfoUpdateService(); ~GAIAInfoUpdateService() override;
// Updates the GAIA info for the profile associated with this instance. // Updates the GAIA info for the profile associated with this instance.
virtual void Update(); virtual void Update();
...@@ -33,17 +33,17 @@ class GAIAInfoUpdateService : public KeyedService, ...@@ -33,17 +33,17 @@ class GAIAInfoUpdateService : public KeyedService,
static bool ShouldUseGAIAProfileInfo(Profile* profile); static bool ShouldUseGAIAProfileInfo(Profile* profile);
// ProfileDownloaderDelegate: // ProfileDownloaderDelegate:
virtual bool NeedsProfilePicture() const override; bool NeedsProfilePicture() const override;
virtual int GetDesiredImageSideLength() const override; int GetDesiredImageSideLength() const override;
virtual Profile* GetBrowserProfile() override; Profile* GetBrowserProfile() override;
virtual std::string GetCachedPictureURL() const override; std::string GetCachedPictureURL() const override;
virtual void OnProfileDownloadSuccess(ProfileDownloader* downloader) override; void OnProfileDownloadSuccess(ProfileDownloader* downloader) override;
virtual void OnProfileDownloadFailure( void OnProfileDownloadFailure(
ProfileDownloader* downloader, ProfileDownloader* downloader,
ProfileDownloaderDelegate::FailureReason reason) override; ProfileDownloaderDelegate::FailureReason reason) override;
// Overridden from KeyedService: // Overridden from KeyedService:
virtual void Shutdown() override; void Shutdown() override;
private: private:
FRIEND_TEST_ALL_PREFIXES(GAIAInfoUpdateServiceTest, ScheduleUpdate); FRIEND_TEST_ALL_PREFIXES(GAIAInfoUpdateServiceTest, ScheduleUpdate);
...@@ -52,11 +52,11 @@ class GAIAInfoUpdateService : public KeyedService, ...@@ -52,11 +52,11 @@ class GAIAInfoUpdateService : public KeyedService,
void ScheduleNextUpdate(); void ScheduleNextUpdate();
// Overridden from SigninManagerBase::Observer: // Overridden from SigninManagerBase::Observer:
virtual void GoogleSigninSucceeded(const std::string& account_id, void GoogleSigninSucceeded(const std::string& account_id,
const std::string& username, const std::string& username,
const std::string& password) override; const std::string& password) override;
virtual void GoogleSignedOut(const std::string& account_id, void GoogleSignedOut(const std::string& account_id,
const std::string& username) override; const std::string& username) override;
Profile* profile_; Profile* profile_;
scoped_ptr<ProfileDownloader> profile_image_downloader_; scoped_ptr<ProfileDownloader> profile_image_downloader_;
......
...@@ -32,15 +32,15 @@ class GAIAInfoUpdateServiceFactory : public BrowserContextKeyedServiceFactory { ...@@ -32,15 +32,15 @@ class GAIAInfoUpdateServiceFactory : public BrowserContextKeyedServiceFactory {
friend struct DefaultSingletonTraits<GAIAInfoUpdateServiceFactory>; friend struct DefaultSingletonTraits<GAIAInfoUpdateServiceFactory>;
GAIAInfoUpdateServiceFactory(); GAIAInfoUpdateServiceFactory();
virtual ~GAIAInfoUpdateServiceFactory(); ~GAIAInfoUpdateServiceFactory() override;
// BrowserContextKeyedServiceFactory: // BrowserContextKeyedServiceFactory:
virtual KeyedService* BuildServiceInstanceFor( KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override; content::BrowserContext* context) const override;
virtual void RegisterProfilePrefs( void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) override; user_prefs::PrefRegistrySyncable* registry) override;
virtual bool ServiceIsNULLWhileTesting() const override; bool ServiceIsNULLWhileTesting() const override;
DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateServiceFactory); DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateServiceFactory);
}; };
......
...@@ -131,7 +131,7 @@ class HostZoomMapBrowserTest : public InProcessBrowserTest { ...@@ -131,7 +131,7 @@ class HostZoomMapBrowserTest : public InProcessBrowserTest {
} }
// BrowserTestBase: // BrowserTestBase:
virtual void SetUpOnMainThread() override { void SetUpOnMainThread() override {
ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
embedded_test_server()->RegisterRequestHandler(base::Bind( embedded_test_server()->RegisterRequestHandler(base::Bind(
&HostZoomMapBrowserTest::HandleRequest, base::Unretained(this))); &HostZoomMapBrowserTest::HandleRequest, base::Unretained(this)));
...@@ -150,7 +150,7 @@ class HostZoomMapBrowserTestWithPrefs : public HostZoomMapBrowserTest { ...@@ -150,7 +150,7 @@ class HostZoomMapBrowserTestWithPrefs : public HostZoomMapBrowserTest {
private: private:
// InProcessBrowserTest: // InProcessBrowserTest:
virtual bool SetUpUserDataDirectory() override { bool SetUpUserDataDirectory() override {
std::replace(prefs_data_.begin(), prefs_data_.end(), '\'', '\"'); std::replace(prefs_data_.begin(), prefs_data_.end(), '\'', '\"');
// It seems the hash functions on different platforms can return different // It seems the hash functions on different platforms can return different
// values for the same input, so make sure we test with the hash appropriate // values for the same input, so make sure we test with the hash appropriate
......
...@@ -22,13 +22,13 @@ class PolicyMap; ...@@ -22,13 +22,13 @@ class PolicyMap;
class IncognitoModePolicyHandler : public ConfigurationPolicyHandler { class IncognitoModePolicyHandler : public ConfigurationPolicyHandler {
public: public:
IncognitoModePolicyHandler(); IncognitoModePolicyHandler();
virtual ~IncognitoModePolicyHandler(); ~IncognitoModePolicyHandler() override;
// ConfigurationPolicyHandler methods: // ConfigurationPolicyHandler methods:
virtual bool CheckPolicySettings(const PolicyMap& policies, bool CheckPolicySettings(const PolicyMap& policies,
PolicyErrorMap* errors) override; PolicyErrorMap* errors) override;
virtual void ApplyPolicySettings(const PolicyMap& policies, void ApplyPolicySettings(const PolicyMap& policies,
PrefValueMap* prefs) override; PrefValueMap* prefs) override;
private: private:
DISALLOW_COPY_AND_ASSIGN(IncognitoModePolicyHandler); DISALLOW_COPY_AND_ASSIGN(IncognitoModePolicyHandler);
......
...@@ -32,42 +32,40 @@ class PrefServiceSyncable; ...@@ -32,42 +32,40 @@ class PrefServiceSyncable;
class OffTheRecordProfileImpl : public Profile { class OffTheRecordProfileImpl : public Profile {
public: public:
explicit OffTheRecordProfileImpl(Profile* real_profile); explicit OffTheRecordProfileImpl(Profile* real_profile);
virtual ~OffTheRecordProfileImpl(); ~OffTheRecordProfileImpl() override;
void Init(); void Init();
// Profile implementation. // Profile implementation.
virtual std::string GetProfileName() override; std::string GetProfileName() override;
virtual ProfileType GetProfileType() const override; ProfileType GetProfileType() const override;
virtual Profile* GetOffTheRecordProfile() override; Profile* GetOffTheRecordProfile() override;
virtual void DestroyOffTheRecordProfile() override; void DestroyOffTheRecordProfile() override;
virtual bool HasOffTheRecordProfile() override; bool HasOffTheRecordProfile() override;
virtual Profile* GetOriginalProfile() override; Profile* GetOriginalProfile() override;
virtual bool IsSupervised() override; bool IsSupervised() override;
virtual ExtensionSpecialStoragePolicy* ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override;
GetExtensionSpecialStoragePolicy() override; PrefService* GetPrefs() override;
virtual PrefService* GetPrefs() override; PrefService* GetOffTheRecordPrefs() override;
virtual PrefService* GetOffTheRecordPrefs() override; net::URLRequestContextGetter* GetRequestContextForExtensions() override;
virtual net::URLRequestContextGetter* net::URLRequestContextGetter* CreateRequestContext(
GetRequestContextForExtensions() override;
virtual net::URLRequestContextGetter* CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) override; content::URLRequestInterceptorScopedVector request_interceptors) override;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path, const base::FilePath& partition_path,
bool in_memory, bool in_memory,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) override; content::URLRequestInterceptorScopedVector request_interceptors) override;
virtual net::SSLConfigService* GetSSLConfigService() override; net::SSLConfigService* GetSSLConfigService() override;
virtual HostContentSettingsMap* GetHostContentSettingsMap() override; HostContentSettingsMap* GetHostContentSettingsMap() override;
virtual bool IsSameProfile(Profile* profile) override; bool IsSameProfile(Profile* profile) override;
virtual Time GetStartTime() const override; Time GetStartTime() const override;
virtual history::TopSites* GetTopSitesWithoutCreating() override; history::TopSites* GetTopSitesWithoutCreating() override;
virtual history::TopSites* GetTopSites() override; history::TopSites* GetTopSites() override;
virtual base::FilePath last_selected_directory() override; base::FilePath last_selected_directory() override;
virtual void set_last_selected_directory(const base::FilePath& path) override; void set_last_selected_directory(const base::FilePath& path) override;
virtual bool WasCreatedByVersionOrLater(const std::string& version) override; bool WasCreatedByVersionOrLater(const std::string& version) override;
virtual void SetExitType(ExitType exit_type) override; void SetExitType(ExitType exit_type) override;
virtual ExitType GetLastSessionExitType() override; ExitType GetLastSessionExitType() override;
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
virtual void ChangeAppLocale(const std::string& locale, virtual void ChangeAppLocale(const std::string& locale,
...@@ -76,36 +74,33 @@ class OffTheRecordProfileImpl : public Profile { ...@@ -76,36 +74,33 @@ class OffTheRecordProfileImpl : public Profile {
virtual void InitChromeOSPreferences() override; virtual void InitChromeOSPreferences() override;
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
virtual PrefProxyConfigTracker* GetProxyConfigTracker() override; PrefProxyConfigTracker* GetProxyConfigTracker() override;
virtual chrome_browser_net::Predictor* GetNetworkPredictor() override; chrome_browser_net::Predictor* GetNetworkPredictor() override;
virtual DevToolsNetworkController* GetDevToolsNetworkController() override; DevToolsNetworkController* GetDevToolsNetworkController() override;
virtual void ClearNetworkingHistorySince( void ClearNetworkingHistorySince(base::Time time,
base::Time time, const base::Closure& completion) override;
const base::Closure& completion) override; GURL GetHomePage() override;
virtual GURL GetHomePage() override;
// content::BrowserContext implementation: // content::BrowserContext implementation:
virtual base::FilePath GetPath() const override; base::FilePath GetPath() const override;
virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override; scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
virtual bool IsOffTheRecord() const override; bool IsOffTheRecord() const override;
virtual content::DownloadManagerDelegate* content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
GetDownloadManagerDelegate() override; net::URLRequestContextGetter* GetRequestContext() override;
virtual net::URLRequestContextGetter* GetRequestContext() override; net::URLRequestContextGetter* GetRequestContextForRenderProcess(
virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
int renderer_child_id) override; int renderer_child_id) override;
virtual net::URLRequestContextGetter* GetMediaRequestContext() override; net::URLRequestContextGetter* GetMediaRequestContext() override;
virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
int renderer_child_id) override; int renderer_child_id) override;
virtual net::URLRequestContextGetter* net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
GetMediaRequestContextForStoragePartition( const base::FilePath& partition_path,
const base::FilePath& partition_path, bool in_memory) override;
bool in_memory) override; content::ResourceContext* GetResourceContext() override;
virtual content::ResourceContext* GetResourceContext() override; content::BrowserPluginGuestManager* GetGuestManager() override;
virtual content::BrowserPluginGuestManager* GetGuestManager() override; storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; content::PushMessagingService* GetPushMessagingService() override;
virtual content::PushMessagingService* GetPushMessagingService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
private: private:
FRIEND_TEST_ALL_PREFIXES(OffTheRecordProfileImplTest, GetHostZoomMap); FRIEND_TEST_ALL_PREFIXES(OffTheRecordProfileImplTest, GetHostZoomMap);
......
...@@ -37,12 +37,10 @@ class TestingProfileWithHostZoomMap : public TestingProfile { ...@@ -37,12 +37,10 @@ class TestingProfileWithHostZoomMap : public TestingProfile {
zoom_level_prefs_->InitPrefsAndCopyToHostZoomMap(GetPath(), host_zoom_map); zoom_level_prefs_->InitPrefsAndCopyToHostZoomMap(GetPath(), host_zoom_map);
} }
virtual ~TestingProfileWithHostZoomMap() {} ~TestingProfileWithHostZoomMap() override {}
// Profile overrides: // Profile overrides:
virtual PrefService* GetOffTheRecordPrefs() override { PrefService* GetOffTheRecordPrefs() override { return GetPrefs(); }
return GetPrefs();
}
private: private:
void OnZoomLevelChanged(const HostZoomMap::ZoomLevelChange& change) { void OnZoomLevelChanged(const HostZoomMap::ZoomLevelChange& change) {
...@@ -104,7 +102,7 @@ class OffTheRecordProfileImplTest : public BrowserWithTestWindowTest { ...@@ -104,7 +102,7 @@ class OffTheRecordProfileImplTest : public BrowserWithTestWindowTest {
} }
// BrowserWithTestWindowTest overrides: // BrowserWithTestWindowTest overrides:
virtual TestingProfile* CreateProfile() override { TestingProfile* CreateProfile() override {
return new TestingProfileWithHostZoomMap; return new TestingProfileWithHostZoomMap;
} }
......
...@@ -107,41 +107,37 @@ class OffTheRecordProfileIOData : public ProfileIOData { ...@@ -107,41 +107,37 @@ class OffTheRecordProfileIOData : public ProfileIOData {
friend class base::RefCountedThreadSafe<OffTheRecordProfileIOData>; friend class base::RefCountedThreadSafe<OffTheRecordProfileIOData>;
explicit OffTheRecordProfileIOData(Profile::ProfileType profile_type); explicit OffTheRecordProfileIOData(Profile::ProfileType profile_type);
virtual ~OffTheRecordProfileIOData(); ~OffTheRecordProfileIOData() override;
virtual void InitializeInternal( void InitializeInternal(ProfileParams* profile_params,
ProfileParams* profile_params, content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector
content::URLRequestInterceptorScopedVector request_interceptors) request_interceptors) const override;
const override; void InitializeExtensionsRequestContext(
virtual void InitializeExtensionsRequestContext(
ProfileParams* profile_params) const override; ProfileParams* profile_params) const override;
virtual net::URLRequestContext* InitializeAppRequestContext( net::URLRequestContext* InitializeAppRequestContext(
net::URLRequestContext* main_context, net::URLRequestContext* main_context,
const StoragePartitionDescriptor& partition_descriptor, const StoragePartitionDescriptor& partition_descriptor,
scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
protocol_handler_interceptor, protocol_handler_interceptor,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
const override; const override;
virtual net::URLRequestContext* InitializeMediaRequestContext( net::URLRequestContext* InitializeMediaRequestContext(
net::URLRequestContext* original_context, net::URLRequestContext* original_context,
const StoragePartitionDescriptor& partition_descriptor) const override; const StoragePartitionDescriptor& partition_descriptor) const override;
virtual net::URLRequestContext* net::URLRequestContext* AcquireMediaRequestContext() const override;
AcquireMediaRequestContext() const override; net::URLRequestContext* AcquireIsolatedAppRequestContext(
virtual net::URLRequestContext* AcquireIsolatedAppRequestContext(
net::URLRequestContext* main_context, net::URLRequestContext* main_context,
const StoragePartitionDescriptor& partition_descriptor, const StoragePartitionDescriptor& partition_descriptor,
scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
protocol_handler_interceptor, protocol_handler_interceptor,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
const override; const override;
virtual net::URLRequestContext* net::URLRequestContext* AcquireIsolatedMediaRequestContext(
AcquireIsolatedMediaRequestContext( net::URLRequestContext* app_context,
net::URLRequestContext* app_context, const StoragePartitionDescriptor& partition_descriptor) const override;
const StoragePartitionDescriptor& partition_descriptor)
const override;
mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_;
mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_; mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_;
......
...@@ -153,7 +153,7 @@ class Profile : public content::BrowserContext { ...@@ -153,7 +153,7 @@ class Profile : public content::BrowserContext {
static const char kNoHostedDomainFound[]; static const char kNoHostedDomainFound[];
Profile(); Profile();
virtual ~Profile(); ~Profile() override;
// Profile prefs are registered as soon as the prefs are loaded for the first // Profile prefs are registered as soon as the prefs are loaded for the first
// time. // time.
......
...@@ -14,12 +14,12 @@ class ProfileAvatarDownloader : public chrome::BitmapFetcherDelegate { ...@@ -14,12 +14,12 @@ class ProfileAvatarDownloader : public chrome::BitmapFetcherDelegate {
ProfileAvatarDownloader(size_t icon_index, ProfileAvatarDownloader(size_t icon_index,
const base::FilePath& profile_path, const base::FilePath& profile_path,
ProfileInfoCache* cache); ProfileInfoCache* cache);
virtual ~ProfileAvatarDownloader(); ~ProfileAvatarDownloader() override;
void Start(); void Start();
// BitmapFetcherDelegate: // BitmapFetcherDelegate:
virtual void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override; void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override;
private: private:
// Downloads the avatar image from a url. // Downloads the avatar image from a url.
......
...@@ -57,10 +57,10 @@ class AvatarImageSource : public gfx::CanvasImageSource { ...@@ -57,10 +57,10 @@ class AvatarImageSource : public gfx::CanvasImageSource {
int width, int width,
AvatarPosition position, AvatarPosition position,
AvatarBorder border); AvatarBorder border);
virtual ~AvatarImageSource(); ~AvatarImageSource() override;
// CanvasImageSource override: // CanvasImageSource override:
virtual void Draw(gfx::Canvas* canvas) override; void Draw(gfx::Canvas* canvas) override;
private: private:
gfx::ImageSkia avatar_; gfx::ImageSkia avatar_;
......
...@@ -93,7 +93,7 @@ void SpinThreads() { ...@@ -93,7 +93,7 @@ void SpinThreads() {
class ProfileBrowserTest : public InProcessBrowserTest { class ProfileBrowserTest : public InProcessBrowserTest {
protected: protected:
virtual void SetUpCommandLine(CommandLine* command_line) override { void SetUpCommandLine(CommandLine* command_line) override {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
command_line->AppendSwitch( command_line->AppendSwitch(
chromeos::switches::kIgnoreUserProfileMappingForTests); chromeos::switches::kIgnoreUserProfileMappingForTests);
......
...@@ -31,11 +31,10 @@ class ProfileDestroyer : public content::RenderProcessHostObserver { ...@@ -31,11 +31,10 @@ class ProfileDestroyer : public content::RenderProcessHostObserver {
friend class base::RefCounted<ProfileDestroyer>; friend class base::RefCounted<ProfileDestroyer>;
ProfileDestroyer(Profile* const profile, HostSet* hosts); ProfileDestroyer(Profile* const profile, HostSet* hosts);
virtual ~ProfileDestroyer(); ~ProfileDestroyer() override;
// content::RenderProcessHostObserver override. // content::RenderProcessHostObserver override.
virtual void RenderProcessHostDestroyed( void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
content::RenderProcessHost* host) override;
// Called by the timer to cancel the pending destruction and do it now. // Called by the timer to cancel the pending destruction and do it now.
void DestroyProfile(); void DestroyProfile();
......
...@@ -41,7 +41,7 @@ class ProfileDownloader : public gaia::GaiaOAuthClient::Delegate, ...@@ -41,7 +41,7 @@ class ProfileDownloader : public gaia::GaiaOAuthClient::Delegate,
}; };
explicit ProfileDownloader(ProfileDownloaderDelegate* delegate); explicit ProfileDownloader(ProfileDownloaderDelegate* delegate);
virtual ~ProfileDownloader(); ~ProfileDownloader() override;
// Starts downloading profile information if the necessary authorization token // Starts downloading profile information if the necessary authorization token
// is ready. If not, subscribes to token service and starts fetching if the // is ready. If not, subscribes to token service and starts fetching if the
...@@ -86,28 +86,28 @@ class ProfileDownloader : public gaia::GaiaOAuthClient::Delegate, ...@@ -86,28 +86,28 @@ class ProfileDownloader : public gaia::GaiaOAuthClient::Delegate,
FRIEND_TEST_ALL_PREFIXES(ProfileDownloaderTest, DefaultURL); FRIEND_TEST_ALL_PREFIXES(ProfileDownloaderTest, DefaultURL);
// gaia::GaiaOAuthClient::Delegate implementation. // gaia::GaiaOAuthClient::Delegate implementation.
virtual void OnGetUserInfoResponse( void OnGetUserInfoResponse(
scoped_ptr<base::DictionaryValue> user_info) override; scoped_ptr<base::DictionaryValue> user_info) override;
virtual void OnOAuthError() override; void OnOAuthError() override;
virtual void OnNetworkError(int response_code) override; void OnNetworkError(int response_code) override;
// Overriden from net::URLFetcherDelegate: // Overriden from net::URLFetcherDelegate:
virtual void OnURLFetchComplete(const net::URLFetcher* source) override; void OnURLFetchComplete(const net::URLFetcher* source) override;
// Overriden from ImageDecoder::Delegate: // Overriden from ImageDecoder::Delegate:
virtual void OnImageDecoded(const ImageDecoder* decoder, void OnImageDecoded(const ImageDecoder* decoder,
const SkBitmap& decoded_image) override; const SkBitmap& decoded_image) override;
virtual void OnDecodeImageFailed(const ImageDecoder* decoder) override; void OnDecodeImageFailed(const ImageDecoder* decoder) override;
// Overriden from OAuth2TokenService::Observer: // Overriden from OAuth2TokenService::Observer:
virtual void OnRefreshTokenAvailable(const std::string& account_id) override; void OnRefreshTokenAvailable(const std::string& account_id) override;
// Overriden from OAuth2TokenService::Consumer: // Overriden from OAuth2TokenService::Consumer:
virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
const std::string& access_token, const std::string& access_token,
const base::Time& expiration_time) override; const base::Time& expiration_time) override;
virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, void OnGetTokenFailure(const OAuth2TokenService::Request* request,
const GoogleServiceAuthError& error) override; const GoogleServiceAuthError& error) override;
// Parses the entry response and gets the name, profile image URL and locale. // Parses the entry response and gets the name, profile image URL and locale.
// |data| should be the JSON formatted data return by the response. // |data| should be the JSON formatted data return by the response.
......
...@@ -71,74 +71,69 @@ class ProfileImpl : public Profile { ...@@ -71,74 +71,69 @@ class ProfileImpl : public Profile {
// Value written to prefs when the exit type is EXIT_NORMAL. Public for tests. // Value written to prefs when the exit type is EXIT_NORMAL. Public for tests.
static const char* const kPrefExitTypeNormal; static const char* const kPrefExitTypeNormal;
virtual ~ProfileImpl(); ~ProfileImpl() override;
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
// content::BrowserContext implementation: // content::BrowserContext implementation:
virtual base::FilePath GetPath() const override; base::FilePath GetPath() const override;
virtual content::DownloadManagerDelegate* content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
GetDownloadManagerDelegate() override; net::URLRequestContextGetter* GetRequestContext() override;
virtual net::URLRequestContextGetter* GetRequestContext() override; net::URLRequestContextGetter* GetRequestContextForRenderProcess(
virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
int renderer_child_id) override; int renderer_child_id) override;
virtual net::URLRequestContextGetter* GetMediaRequestContext() override; net::URLRequestContextGetter* GetMediaRequestContext() override;
virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
int renderer_child_id) override; int renderer_child_id) override;
virtual net::URLRequestContextGetter* net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
GetMediaRequestContextForStoragePartition( const base::FilePath& partition_path,
const base::FilePath& partition_path, bool in_memory) override;
bool in_memory) override; content::ResourceContext* GetResourceContext() override;
virtual content::ResourceContext* GetResourceContext() override; content::BrowserPluginGuestManager* GetGuestManager() override;
virtual content::BrowserPluginGuestManager* GetGuestManager() override; storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; content::PushMessagingService* GetPushMessagingService() override;
virtual content::PushMessagingService* GetPushMessagingService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
// Profile implementation: // Profile implementation:
virtual scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override; scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
// Note that this implementation returns the Google-services username, if any, // Note that this implementation returns the Google-services username, if any,
// not the Chrome user's display name. // not the Chrome user's display name.
virtual std::string GetProfileName() override; std::string GetProfileName() override;
virtual ProfileType GetProfileType() const override; ProfileType GetProfileType() const override;
virtual bool IsOffTheRecord() const override; bool IsOffTheRecord() const override;
virtual Profile* GetOffTheRecordProfile() override; Profile* GetOffTheRecordProfile() override;
virtual void DestroyOffTheRecordProfile() override; void DestroyOffTheRecordProfile() override;
virtual bool HasOffTheRecordProfile() override; bool HasOffTheRecordProfile() override;
virtual Profile* GetOriginalProfile() override; Profile* GetOriginalProfile() override;
virtual bool IsSupervised() override; bool IsSupervised() override;
virtual history::TopSites* GetTopSites() override; history::TopSites* GetTopSites() override;
virtual history::TopSites* GetTopSitesWithoutCreating() override; history::TopSites* GetTopSitesWithoutCreating() override;
virtual ExtensionSpecialStoragePolicy* ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override;
GetExtensionSpecialStoragePolicy() override; PrefService* GetPrefs() override;
virtual PrefService* GetPrefs() override; chrome::ChromeZoomLevelPrefs* GetZoomLevelPrefs() override;
virtual chrome::ChromeZoomLevelPrefs* GetZoomLevelPrefs() override; PrefService* GetOffTheRecordPrefs() override;
virtual PrefService* GetOffTheRecordPrefs() override; net::URLRequestContextGetter* GetRequestContextForExtensions() override;
virtual net::URLRequestContextGetter* net::SSLConfigService* GetSSLConfigService() override;
GetRequestContextForExtensions() override; HostContentSettingsMap* GetHostContentSettingsMap() override;
virtual net::SSLConfigService* GetSSLConfigService() override; bool IsSameProfile(Profile* profile) override;
virtual HostContentSettingsMap* GetHostContentSettingsMap() override; base::Time GetStartTime() const override;
virtual bool IsSameProfile(Profile* profile) override; net::URLRequestContextGetter* CreateRequestContext(
virtual base::Time GetStartTime() const override;
virtual net::URLRequestContextGetter* CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) override; content::URLRequestInterceptorScopedVector request_interceptors) override;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path, const base::FilePath& partition_path,
bool in_memory, bool in_memory,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) override; content::URLRequestInterceptorScopedVector request_interceptors) override;
virtual base::FilePath last_selected_directory() override; base::FilePath last_selected_directory() override;
virtual void set_last_selected_directory(const base::FilePath& path) override; void set_last_selected_directory(const base::FilePath& path) override;
virtual chrome_browser_net::Predictor* GetNetworkPredictor() override; chrome_browser_net::Predictor* GetNetworkPredictor() override;
virtual DevToolsNetworkController* GetDevToolsNetworkController() override; DevToolsNetworkController* GetDevToolsNetworkController() override;
virtual void ClearNetworkingHistorySince( void ClearNetworkingHistorySince(base::Time time,
base::Time time, const base::Closure& completion) override;
const base::Closure& completion) override; GURL GetHomePage() override;
virtual GURL GetHomePage() override; bool WasCreatedByVersionOrLater(const std::string& version) override;
virtual bool WasCreatedByVersionOrLater(const std::string& version) override; void SetExitType(ExitType exit_type) override;
virtual void SetExitType(ExitType exit_type) override; ExitType GetLastSessionExitType() override;
virtual ExitType GetLastSessionExitType() override;
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
virtual void ChangeAppLocale(const std::string& locale, virtual void ChangeAppLocale(const std::string& locale,
...@@ -147,7 +142,7 @@ class ProfileImpl : public Profile { ...@@ -147,7 +142,7 @@ class ProfileImpl : public Profile {
virtual void InitChromeOSPreferences() override; virtual void InitChromeOSPreferences() override;
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
virtual PrefProxyConfigTracker* GetProxyConfigTracker() override; PrefProxyConfigTracker* GetProxyConfigTracker() override;
private: private:
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
......
...@@ -149,7 +149,7 @@ class ProfileImplIOData : public ProfileIOData { ...@@ -149,7 +149,7 @@ class ProfileImplIOData : public ProfileIOData {
DISALLOW_COPY_AND_ASSIGN(Handle); DISALLOW_COPY_AND_ASSIGN(Handle);
}; };
virtual bool IsDataReductionProxyEnabled() const override; bool IsDataReductionProxyEnabled() const override;
BooleanPrefMember* data_reduction_proxy_enabled() const { BooleanPrefMember* data_reduction_proxy_enabled() const {
return &data_reduction_proxy_enabled_; return &data_reduction_proxy_enabled_;
...@@ -176,41 +176,37 @@ class ProfileImplIOData : public ProfileIOData { ...@@ -176,41 +176,37 @@ class ProfileImplIOData : public ProfileIOData {
}; };
ProfileImplIOData(); ProfileImplIOData();
virtual ~ProfileImplIOData(); ~ProfileImplIOData() override;
virtual void InitializeInternal( void InitializeInternal(ProfileParams* profile_params,
ProfileParams* profile_params, content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector
content::URLRequestInterceptorScopedVector request_interceptors) request_interceptors) const override;
const override; void InitializeExtensionsRequestContext(
virtual void InitializeExtensionsRequestContext(
ProfileParams* profile_params) const override; ProfileParams* profile_params) const override;
virtual net::URLRequestContext* InitializeAppRequestContext( net::URLRequestContext* InitializeAppRequestContext(
net::URLRequestContext* main_context, net::URLRequestContext* main_context,
const StoragePartitionDescriptor& partition_descriptor, const StoragePartitionDescriptor& partition_descriptor,
scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
protocol_handler_interceptor, protocol_handler_interceptor,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
const override; const override;
virtual net::URLRequestContext* InitializeMediaRequestContext( net::URLRequestContext* InitializeMediaRequestContext(
net::URLRequestContext* original_context, net::URLRequestContext* original_context,
const StoragePartitionDescriptor& partition_descriptor) const override; const StoragePartitionDescriptor& partition_descriptor) const override;
virtual net::URLRequestContext* net::URLRequestContext* AcquireMediaRequestContext() const override;
AcquireMediaRequestContext() const override; net::URLRequestContext* AcquireIsolatedAppRequestContext(
virtual net::URLRequestContext* AcquireIsolatedAppRequestContext(
net::URLRequestContext* main_context, net::URLRequestContext* main_context,
const StoragePartitionDescriptor& partition_descriptor, const StoragePartitionDescriptor& partition_descriptor,
scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
protocol_handler_interceptor, protocol_handler_interceptor,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector request_interceptors) content::URLRequestInterceptorScopedVector request_interceptors)
const override; const override;
virtual net::URLRequestContext* net::URLRequestContext* AcquireIsolatedMediaRequestContext(
AcquireIsolatedMediaRequestContext( net::URLRequestContext* app_context,
net::URLRequestContext* app_context, const StoragePartitionDescriptor& partition_descriptor) const override;
const StoragePartitionDescriptor& partition_descriptor)
const override;
// Deletes all network related data since |time|. It deletes transport // Deletes all network related data since |time|. It deletes transport
// security state since |time| and also deletes HttpServerProperties data. // security state since |time| and also deletes HttpServerProperties data.
......
...@@ -37,7 +37,7 @@ class ProfileInfoCache : public ProfileInfoInterface, ...@@ -37,7 +37,7 @@ class ProfileInfoCache : public ProfileInfoInterface,
public base::SupportsWeakPtr<ProfileInfoCache> { public base::SupportsWeakPtr<ProfileInfoCache> {
public: public:
ProfileInfoCache(PrefService* prefs, const base::FilePath& user_data_dir); ProfileInfoCache(PrefService* prefs, const base::FilePath& user_data_dir);
virtual ~ProfileInfoCache(); ~ProfileInfoCache() override;
// If the |supervised_user_id| is non-empty, the profile will be marked to be // If the |supervised_user_id| is non-empty, the profile will be marked to be
// omitted from the avatar-menu list on desktop versions. This is used while a // omitted from the avatar-menu list on desktop versions. This is used while a
...@@ -52,46 +52,37 @@ class ProfileInfoCache : public ProfileInfoInterface, ...@@ -52,46 +52,37 @@ class ProfileInfoCache : public ProfileInfoInterface,
void DeleteProfileFromCache(const base::FilePath& profile_path); void DeleteProfileFromCache(const base::FilePath& profile_path);
// ProfileInfoInterface: // ProfileInfoInterface:
virtual size_t GetNumberOfProfiles() const override; size_t GetNumberOfProfiles() const override;
// Don't cache this value and reuse, because resorting the menu could cause // Don't cache this value and reuse, because resorting the menu could cause
// the item being referred to to change out from under you. // the item being referred to to change out from under you.
virtual size_t GetIndexOfProfileWithPath( size_t GetIndexOfProfileWithPath(
const base::FilePath& profile_path) const override; const base::FilePath& profile_path) const override;
virtual base::string16 GetNameOfProfileAtIndex(size_t index) const override; base::string16 GetNameOfProfileAtIndex(size_t index) const override;
virtual base::string16 GetShortcutNameOfProfileAtIndex(size_t index) base::string16 GetShortcutNameOfProfileAtIndex(size_t index) const override;
const override; base::FilePath GetPathOfProfileAtIndex(size_t index) const override;
virtual base::FilePath GetPathOfProfileAtIndex(size_t index) const override; base::Time GetProfileActiveTimeAtIndex(size_t index) const override;
virtual base::Time GetProfileActiveTimeAtIndex(size_t index) const override; base::string16 GetUserNameOfProfileAtIndex(size_t index) const override;
virtual base::string16 GetUserNameOfProfileAtIndex( const gfx::Image& GetAvatarIconOfProfileAtIndex(size_t index) const override;
size_t index) const override; std::string GetLocalAuthCredentialsOfProfileAtIndex(
virtual const gfx::Image& GetAvatarIconOfProfileAtIndex(
size_t index) const override;
virtual std::string GetLocalAuthCredentialsOfProfileAtIndex(
size_t index) const override; size_t index) const override;
// Note that a return value of false could mean an error in collection or // Note that a return value of false could mean an error in collection or
// that there are currently no background apps running. However, the action // that there are currently no background apps running. However, the action
// which results is the same in both cases (thus far). // which results is the same in both cases (thus far).
virtual bool GetBackgroundStatusOfProfileAtIndex( bool GetBackgroundStatusOfProfileAtIndex(size_t index) const override;
size_t index) const override; base::string16 GetGAIANameOfProfileAtIndex(size_t index) const override;
virtual base::string16 GetGAIANameOfProfileAtIndex( base::string16 GetGAIAGivenNameOfProfileAtIndex(size_t index) const override;
size_t index) const override;
virtual base::string16 GetGAIAGivenNameOfProfileAtIndex(
size_t index) const override;
// Returns the GAIA picture for the given profile. This may return NULL // Returns the GAIA picture for the given profile. This may return NULL
// if the profile does not have a GAIA picture or if the picture must be // if the profile does not have a GAIA picture or if the picture must be
// loaded from disk. // loaded from disk.
virtual const gfx::Image* GetGAIAPictureOfProfileAtIndex( const gfx::Image* GetGAIAPictureOfProfileAtIndex(size_t index) const override;
size_t index) const override; bool IsUsingGAIAPictureOfProfileAtIndex(size_t index) const override;
virtual bool IsUsingGAIAPictureOfProfileAtIndex( bool ProfileIsSupervisedAtIndex(size_t index) const override;
size_t index) const override; bool IsOmittedProfileAtIndex(size_t index) const override;
virtual bool ProfileIsSupervisedAtIndex(size_t index) const override; bool ProfileIsSigninRequiredAtIndex(size_t index) const override;
virtual bool IsOmittedProfileAtIndex(size_t index) const override; std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const override;
virtual bool ProfileIsSigninRequiredAtIndex(size_t index) const override; bool ProfileIsEphemeralAtIndex(size_t index) const override;
virtual std::string GetSupervisedUserIdOfProfileAtIndex(size_t index) const bool ProfileIsUsingDefaultNameAtIndex(size_t index) const override;
override; bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const override;
virtual bool ProfileIsEphemeralAtIndex(size_t index) const override;
virtual bool ProfileIsUsingDefaultNameAtIndex(size_t index) const override;
virtual bool ProfileIsUsingDefaultAvatarAtIndex(size_t index) const override;
size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const; size_t GetAvatarIconIndexOfProfileAtIndex(size_t index) const;
......
...@@ -24,19 +24,16 @@ class ProfileNameVerifierObserver : public ProfileInfoCacheObserver { ...@@ -24,19 +24,16 @@ class ProfileNameVerifierObserver : public ProfileInfoCacheObserver {
public: public:
explicit ProfileNameVerifierObserver( explicit ProfileNameVerifierObserver(
TestingProfileManager* testing_profile_manager); TestingProfileManager* testing_profile_manager);
virtual ~ProfileNameVerifierObserver(); ~ProfileNameVerifierObserver() override;
// ProfileInfoCacheObserver overrides: // ProfileInfoCacheObserver overrides:
virtual void OnProfileAdded(const base::FilePath& profile_path) override; void OnProfileAdded(const base::FilePath& profile_path) override;
virtual void OnProfileWillBeRemoved( void OnProfileWillBeRemoved(const base::FilePath& profile_path) override;
const base::FilePath& profile_path) override; void OnProfileWasRemoved(const base::FilePath& profile_path,
virtual void OnProfileWasRemoved(const base::FilePath& profile_path, const base::string16& profile_name) override;
const base::string16& profile_name) override; void OnProfileNameChanged(const base::FilePath& profile_path,
virtual void OnProfileNameChanged( const base::string16& old_profile_name) override;
const base::FilePath& profile_path, void OnProfileAvatarChanged(const base::FilePath& profile_path) override;
const base::string16& old_profile_name) override;
virtual void OnProfileAvatarChanged(
const base::FilePath& profile_path) override;
private: private:
ProfileInfoCache* GetCache(); ProfileInfoCache* GetCache();
......
...@@ -273,7 +273,7 @@ class ProfileIOData { ...@@ -273,7 +273,7 @@ class ProfileIOData {
scoped_ptr<net::HttpTransactionFactory> http_factory); scoped_ptr<net::HttpTransactionFactory> http_factory);
private: private:
virtual ~MediaRequestContext(); ~MediaRequestContext() override;
scoped_ptr<net::HttpTransactionFactory> http_factory_; scoped_ptr<net::HttpTransactionFactory> http_factory_;
}; };
...@@ -290,7 +290,7 @@ class ProfileIOData { ...@@ -290,7 +290,7 @@ class ProfileIOData {
void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory); void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory);
private: private:
virtual ~AppRequestContext(); ~AppRequestContext() override;
scoped_refptr<net::CookieStore> cookie_store_; scoped_refptr<net::CookieStore> cookie_store_;
scoped_ptr<net::HttpTransactionFactory> http_factory_; scoped_ptr<net::HttpTransactionFactory> http_factory_;
...@@ -486,19 +486,19 @@ class ProfileIOData { ...@@ -486,19 +486,19 @@ class ProfileIOData {
class ResourceContext : public content::ResourceContext { class ResourceContext : public content::ResourceContext {
public: public:
explicit ResourceContext(ProfileIOData* io_data); explicit ResourceContext(ProfileIOData* io_data);
virtual ~ResourceContext(); ~ResourceContext() override;
// ResourceContext implementation: // ResourceContext implementation:
virtual net::HostResolver* GetHostResolver() override; net::HostResolver* GetHostResolver() override;
virtual net::URLRequestContext* GetRequestContext() override; net::URLRequestContext* GetRequestContext() override;
virtual scoped_ptr<net::ClientCertStore> CreateClientCertStore() override; scoped_ptr<net::ClientCertStore> CreateClientCertStore() override;
virtual void CreateKeygenHandler( void CreateKeygenHandler(
uint32 key_size_in_bits, uint32 key_size_in_bits,
const std::string& challenge_string, const std::string& challenge_string,
const GURL& url, const GURL& url,
const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback) const base::Callback<void(scoped_ptr<net::KeygenHandler>)>& callback)
override; override;
virtual SaltCallback GetMediaDeviceIDSalt() override; SaltCallback GetMediaDeviceIDSalt() override;
private: private:
friend class ProfileIOData; friend class ProfileIOData;
......
...@@ -18,17 +18,17 @@ class ProfileInfoInterface; ...@@ -18,17 +18,17 @@ class ProfileInfoInterface;
class ProfileListDesktop : public ProfileList { class ProfileListDesktop : public ProfileList {
public: public:
explicit ProfileListDesktop(ProfileInfoInterface* profile_cache); explicit ProfileListDesktop(ProfileInfoInterface* profile_cache);
virtual ~ProfileListDesktop(); ~ProfileListDesktop() override;
// ProfileList overrides: // ProfileList overrides:
virtual size_t GetNumberOfItems() const override; size_t GetNumberOfItems() const override;
virtual const AvatarMenu::Item& GetItemAt(size_t index) const override; const AvatarMenu::Item& GetItemAt(size_t index) const override;
virtual void RebuildMenu() override; void RebuildMenu() override;
// Returns the menu index of the profile at |index| in the ProfileInfoCache. // Returns the menu index of the profile at |index| in the ProfileInfoCache.
// The profile index must exist, and it may not be marked as omitted from the // The profile index must exist, and it may not be marked as omitted from the
// menu. // menu.
virtual size_t MenuIndexFromProfileIndex(size_t index) override; size_t MenuIndexFromProfileIndex(size_t index) override;
virtual void ActiveProfilePathChanged(base::FilePath& path) override; void ActiveProfilePathChanged(base::FilePath& path) override;
private: private:
void ClearMenu(); void ClearMenu();
......
...@@ -30,12 +30,9 @@ namespace { ...@@ -30,12 +30,9 @@ namespace {
class MockObserver : public AvatarMenuObserver { class MockObserver : public AvatarMenuObserver {
public: public:
MockObserver() : count_(0) {} MockObserver() : count_(0) {}
virtual ~MockObserver() {} ~MockObserver() override {}
virtual void OnAvatarMenuChanged( void OnAvatarMenuChanged(AvatarMenu* avatar_menu) override { ++count_; }
AvatarMenu* avatar_menu) override {
++count_;
}
int change_count() const { return count_; } int change_count() const { return count_; }
......
...@@ -34,7 +34,7 @@ class ProfileManager : public base::NonThreadSafe, ...@@ -34,7 +34,7 @@ class ProfileManager : public base::NonThreadSafe,
typedef base::Callback<void(Profile*, Profile::CreateStatus)> CreateCallback; typedef base::Callback<void(Profile*, Profile::CreateStatus)> CreateCallback;
explicit ProfileManager(const base::FilePath& user_data_dir); explicit ProfileManager(const base::FilePath& user_data_dir);
virtual ~ProfileManager(); ~ProfileManager() override;
#if defined(ENABLE_SESSION_SERVICE) #if defined(ENABLE_SESSION_SERVICE)
// Invokes SessionServiceFactory::ShutdownForProfile() for all profiles. // Invokes SessionServiceFactory::ShutdownForProfile() for all profiles.
...@@ -188,14 +188,14 @@ class ProfileManager : public base::NonThreadSafe, ...@@ -188,14 +188,14 @@ class ProfileManager : public base::NonThreadSafe,
bool IsLoggedIn() const { return logged_in_; } bool IsLoggedIn() const { return logged_in_; }
// content::NotificationObserver implementation. // content::NotificationObserver implementation.
virtual void Observe(int type, void Observe(int type,
const content::NotificationSource& source, const content::NotificationSource& source,
const content::NotificationDetails& details) override; const content::NotificationDetails& details) override;
// Profile::Delegate implementation: // Profile::Delegate implementation:
virtual void OnProfileCreated(Profile* profile, void OnProfileCreated(Profile* profile,
bool success, bool success,
bool is_new_profile) override; bool is_new_profile) override;
protected: protected:
// Does final initial actions. // Does final initial actions.
...@@ -287,12 +287,12 @@ class ProfileManager : public base::NonThreadSafe, ...@@ -287,12 +287,12 @@ class ProfileManager : public base::NonThreadSafe,
class BrowserListObserver : public chrome::BrowserListObserver { class BrowserListObserver : public chrome::BrowserListObserver {
public: public:
explicit BrowserListObserver(ProfileManager* manager); explicit BrowserListObserver(ProfileManager* manager);
virtual ~BrowserListObserver(); ~BrowserListObserver() override;
// chrome::BrowserListObserver implementation. // chrome::BrowserListObserver implementation.
virtual void OnBrowserAdded(Browser* browser) override; void OnBrowserAdded(Browser* browser) override;
virtual void OnBrowserRemoved(Browser* browser) override; void OnBrowserRemoved(Browser* browser) override;
virtual void OnBrowserSetLastActive(Browser* browser) override; void OnBrowserSetLastActive(Browser* browser) override;
private: private:
ProfileManager* profile_manager_; ProfileManager* profile_manager_;
...@@ -359,8 +359,8 @@ class ProfileManagerWithoutInit : public ProfileManager { ...@@ -359,8 +359,8 @@ class ProfileManagerWithoutInit : public ProfileManager {
explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir);
protected: protected:
virtual void DoFinalInitForServices(Profile*, bool) override {} void DoFinalInitForServices(Profile*, bool) override {}
virtual void DoFinalInitLogging(Profile*) override {} void DoFinalInitLogging(Profile*) override {}
}; };
#endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
...@@ -69,7 +69,7 @@ class ProfileRemovalObserver : public ProfileInfoCacheObserver { ...@@ -69,7 +69,7 @@ class ProfileRemovalObserver : public ProfileInfoCacheObserver {
this); this);
} }
virtual ~ProfileRemovalObserver() { ~ProfileRemovalObserver() override {
g_browser_process->profile_manager()->GetProfileInfoCache().RemoveObserver( g_browser_process->profile_manager()->GetProfileInfoCache().RemoveObserver(
this); this);
} }
...@@ -77,8 +77,7 @@ class ProfileRemovalObserver : public ProfileInfoCacheObserver { ...@@ -77,8 +77,7 @@ class ProfileRemovalObserver : public ProfileInfoCacheObserver {
std::string last_used_profile_name() { return last_used_profile_name_; } std::string last_used_profile_name() { return last_used_profile_name_; }
// ProfileInfoCacheObserver overrides: // ProfileInfoCacheObserver overrides:
virtual void OnProfileWillBeRemoved( void OnProfileWillBeRemoved(const base::FilePath& profile_path) override {
const base::FilePath& profile_path) override {
last_used_profile_name_ = g_browser_process->local_state()->GetString( last_used_profile_name_ = g_browser_process->local_state()->GetString(
prefs::kProfileLastUsed); prefs::kProfileLastUsed);
} }
...@@ -96,7 +95,7 @@ class PasswordStoreConsumerVerifier : ...@@ -96,7 +95,7 @@ class PasswordStoreConsumerVerifier :
public: public:
PasswordStoreConsumerVerifier() : called_(false) {} PasswordStoreConsumerVerifier() : called_(false) {}
virtual void OnGetPasswordStoreResults( void OnGetPasswordStoreResults(
const std::vector<autofill::PasswordForm*>& results) override { const std::vector<autofill::PasswordForm*>& results) override {
EXPECT_FALSE(called_); EXPECT_FALSE(called_);
called_ = true; called_ = true;
...@@ -123,7 +122,7 @@ class PasswordStoreConsumerVerifier : ...@@ -123,7 +122,7 @@ class PasswordStoreConsumerVerifier :
// platforms. // platforms.
class ProfileManagerBrowserTest : public InProcessBrowserTest { class ProfileManagerBrowserTest : public InProcessBrowserTest {
protected: protected:
virtual void SetUpCommandLine(CommandLine* command_line) override { void SetUpCommandLine(CommandLine* command_line) override {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
command_line->AppendSwitch( command_line->AppendSwitch(
chromeos::switches::kIgnoreUserProfileMappingForTests); chromeos::switches::kIgnoreUserProfileMappingForTests);
......
...@@ -71,8 +71,7 @@ class UnittestProfileManager : public ::ProfileManagerWithoutInit { ...@@ -71,8 +71,7 @@ class UnittestProfileManager : public ::ProfileManagerWithoutInit {
: ::ProfileManagerWithoutInit(user_data_dir) {} : ::ProfileManagerWithoutInit(user_data_dir) {}
protected: protected:
virtual Profile* CreateProfileHelper( Profile* CreateProfileHelper(const base::FilePath& file_path) override {
const base::FilePath& file_path) override {
if (!base::PathExists(file_path)) { if (!base::PathExists(file_path)) {
if (!base::CreateDirectory(file_path)) if (!base::CreateDirectory(file_path))
return NULL; return NULL;
...@@ -80,8 +79,8 @@ class UnittestProfileManager : public ::ProfileManagerWithoutInit { ...@@ -80,8 +79,8 @@ class UnittestProfileManager : public ::ProfileManagerWithoutInit {
return new TestingProfile(file_path, NULL); return new TestingProfile(file_path, NULL);
} }
virtual Profile* CreateProfileAsyncHelper(const base::FilePath& path, Profile* CreateProfileAsyncHelper(const base::FilePath& path,
Delegate* delegate) override { Delegate* delegate) override {
// This is safe while all file operations are done on the FILE thread. // This is safe while all file operations are done on the FILE thread.
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE, BrowserThread::FILE, FROM_HERE,
...@@ -392,8 +391,7 @@ class UnittestGuestProfileManager : public UnittestProfileManager { ...@@ -392,8 +391,7 @@ class UnittestGuestProfileManager : public UnittestProfileManager {
: UnittestProfileManager(user_data_dir) {} : UnittestProfileManager(user_data_dir) {}
protected: protected:
virtual Profile* CreateProfileHelper( Profile* CreateProfileHelper(const base::FilePath& file_path) override {
const base::FilePath& file_path) override {
TestingProfile::Builder builder; TestingProfile::Builder builder;
builder.SetGuestSession(); builder.SetGuestSession();
builder.SetPath(file_path); builder.SetPath(file_path);
......
...@@ -57,12 +57,11 @@ class BrowserAddedForProfileObserver : public chrome::BrowserListObserver { ...@@ -57,12 +57,11 @@ class BrowserAddedForProfileObserver : public chrome::BrowserListObserver {
DCHECK(!callback_.is_null()); DCHECK(!callback_.is_null());
BrowserList::AddObserver(this); BrowserList::AddObserver(this);
} }
virtual ~BrowserAddedForProfileObserver() { ~BrowserAddedForProfileObserver() override {}
}
private: private:
// Overridden from BrowserListObserver: // Overridden from BrowserListObserver:
virtual void OnBrowserAdded(Browser* browser) override { void OnBrowserAdded(Browser* browser) override {
if (browser->profile() == profile_) { if (browser->profile() == profile_) {
BrowserList::RemoveObserver(this); BrowserList::RemoveObserver(this);
callback_.Run(profile_, Profile::CREATE_STATUS_INITIALIZED); callback_.Run(profile_, Profile::CREATE_STATUS_INITIALIZED);
......
...@@ -21,7 +21,7 @@ class StartupTaskRunnerService : public base::NonThreadSafe, ...@@ -21,7 +21,7 @@ class StartupTaskRunnerService : public base::NonThreadSafe,
public KeyedService { public KeyedService {
public: public:
explicit StartupTaskRunnerService(Profile* profile); explicit StartupTaskRunnerService(Profile* profile);
virtual ~StartupTaskRunnerService(); ~StartupTaskRunnerService() override;
// Returns sequenced task runner where all bookmarks I/O operations are // Returns sequenced task runner where all bookmarks I/O operations are
// performed. // performed.
......
...@@ -28,10 +28,10 @@ class StartupTaskRunnerServiceFactory ...@@ -28,10 +28,10 @@ class StartupTaskRunnerServiceFactory
friend struct DefaultSingletonTraits<StartupTaskRunnerServiceFactory>; friend struct DefaultSingletonTraits<StartupTaskRunnerServiceFactory>;
StartupTaskRunnerServiceFactory(); StartupTaskRunnerServiceFactory();
virtual ~StartupTaskRunnerServiceFactory(); ~StartupTaskRunnerServiceFactory() override;
// BrowserContextKeyedServiceFactory: // BrowserContextKeyedServiceFactory:
virtual KeyedService* BuildServiceInstanceFor( KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override; content::BrowserContext* profile) const override;
DISALLOW_COPY_AND_ASSIGN(StartupTaskRunnerServiceFactory); DISALLOW_COPY_AND_ASSIGN(StartupTaskRunnerServiceFactory);
......
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