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