diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 20:07:12 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 20:07:12 +0000 |
commit | 37757c6de5d1eb7e2240e4701793a632a6ff9f5d (patch) | |
tree | d9d61cdce8e751a268ae93be8fa9b253aee6c6bb /content/browser | |
parent | 5a92f01e87090515d3403a854d0569680d9596e2 (diff) | |
download | chromium_src-37757c6de5d1eb7e2240e4701793a632a6ff9f5d.zip chromium_src-37757c6de5d1eb7e2240e4701793a632a6ff9f5d.tar.gz chromium_src-37757c6de5d1eb7e2240e4701793a632a6ff9f5d.tar.bz2 |
Rename DownloadItem::BrowserContext to GetBrowserContext, to match other getters in interfaces. This also comes up because without the Get, we have a redundant "content::" in the interface.
Review URL: http://codereview.chromium.org/9006013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/download/download_item_impl.cc | 6 | ||||
-rw-r--r-- | content/browser/download/download_item_impl.h | 15 | ||||
-rw-r--r-- | content/browser/download/download_manager_impl.cc | 2 | ||||
-rw-r--r-- | content/browser/download/download_manager_impl.h | 4 | ||||
-rw-r--r-- | content/browser/download/mock_download_item.h | 2 | ||||
-rw-r--r-- | content/browser/download/mock_download_manager.cc | 2 | ||||
-rw-r--r-- | content/browser/download/mock_download_manager.h | 2 |
7 files changed, 11 insertions, 22 deletions
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc index e5a08e8..437209f 100644 --- a/content/browser/download/download_item_impl.cc +++ b/content/browser/download/download_item_impl.cc @@ -685,7 +685,7 @@ bool DownloadItemImpl::MatchesQuery(const string16& query) const { // "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD" std::string languages; languages = content::GetContentClient()->browser()->GetAcceptLangs( - BrowserContext()); + GetBrowserContext()); string16 url_formatted(net::FormatUrl(GetURL(), languages)); if (base::i18n::StringSearchIgnoringCaseAndAccents(query, url_formatted)) return true; @@ -757,8 +757,8 @@ TabContents* DownloadItemImpl::GetTabContents() const { return NULL; } -content::BrowserContext* DownloadItemImpl::BrowserContext() const { - return delegate_->BrowserContext(); +content::BrowserContext* DownloadItemImpl::GetBrowserContext() const { + return delegate_->GetBrowserContext(); } FilePath DownloadItemImpl::GetTargetFilePath() const { diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h index 2f81bf7..a84faa1 100644 --- a/content/browser/download/download_item_impl.h +++ b/content/browser/download/download_item_impl.h @@ -16,22 +16,11 @@ #include "base/timer.h" #include "content/browser/download/download_id.h" #include "content/browser/download/download_request_handle.h" -#include "content/browser/download/download_state_info.h" -#include "content/browser/download/interrupt_reasons.h" #include "content/common/content_export.h" #include "content/public/browser/download_item.h" #include "googleurl/src/gurl.h" #include "net/base/net_errors.h" -class DownloadFileManager; -class TabContents; - -struct DownloadCreateInfo; -struct DownloadPersistentStoreInfo; - -namespace content { -class BrowserContext; -} // See download_item.h for usage. class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem { @@ -70,7 +59,7 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem { virtual void MaybeCompleteDownload(DownloadItem* download) = 0; // For contextual issues like language and prefs. - virtual content::BrowserContext* BrowserContext() const = 0; + virtual content::BrowserContext* GetBrowserContext() const = 0; // Handle any delegate portions of a state change operation on the // DownloadItem. @@ -193,7 +182,7 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem { virtual InterruptReason GetLastReason() const OVERRIDE; virtual DownloadPersistentStoreInfo GetPersistentStoreInfo() const OVERRIDE; virtual DownloadStateInfo GetStateInfo() const OVERRIDE; - virtual content::BrowserContext* BrowserContext() const OVERRIDE; + virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; virtual TabContents* GetTabContents() const OVERRIDE; virtual FilePath GetTargetFilePath() const OVERRIDE; virtual FilePath GetFileNameToReportUser() const OVERRIDE; diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc index ab0253f..773eb59 100644 --- a/content/browser/download/download_manager_impl.cc +++ b/content/browser/download/download_manager_impl.cc @@ -333,7 +333,7 @@ void DownloadManagerImpl::RestartDownload( } } -content::BrowserContext* DownloadManagerImpl::BrowserContext() const { +content::BrowserContext* DownloadManagerImpl::GetBrowserContext() const { return browser_context_; } diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h index a419e8d..9f8a7b5 100644 --- a/content/browser/download/download_manager_impl.h +++ b/content/browser/download/download_manager_impl.h @@ -74,7 +74,7 @@ class CONTENT_EXPORT DownloadManagerImpl virtual void OnItemAddedToPersistentStore(int32 download_id, int64 db_handle) OVERRIDE; virtual int InProgressCount() const OVERRIDE; - virtual content::BrowserContext* BrowserContext() const OVERRIDE; + virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; virtual FilePath LastDownloadPath() OVERRIDE; virtual void CreateDownloadItem( DownloadCreateInfo* info, @@ -98,7 +98,7 @@ class CONTENT_EXPORT DownloadManagerImpl content::DownloadManagerDelegate* delegate) OVERRIDE; // Overridden from DownloadItemImpl::Delegate - // (Note that |BrowserContext| are present in both interfaces.) + // (Note that |GetBrowserContext| are present in both interfaces.) virtual bool ShouldOpenDownload(content::DownloadItem* item) OVERRIDE; virtual bool ShouldOpenFileBasedOnExtension( const FilePath& path) OVERRIDE; diff --git a/content/browser/download/mock_download_item.h b/content/browser/download/mock_download_item.h index 905ce8e..a46b7eb 100644 --- a/content/browser/download/mock_download_item.h +++ b/content/browser/download/mock_download_item.h @@ -98,7 +98,7 @@ class MockDownloadItem : public content::DownloadItem { MOCK_CONST_METHOD0(GetLastReason, InterruptReason()); MOCK_CONST_METHOD0(GetPersistentStoreInfo, DownloadPersistentStoreInfo()); MOCK_CONST_METHOD0(GetStateInfo, DownloadStateInfo()); - MOCK_CONST_METHOD0(BrowserContext, content::BrowserContext*()); + MOCK_CONST_METHOD0(GetBrowserContext, content::BrowserContext*()); MOCK_CONST_METHOD0(GetTabContents, TabContents*()); MOCK_CONST_METHOD0(GetTargetFilePath, FilePath()); MOCK_CONST_METHOD0(GetFileNameToReportUser, FilePath()); diff --git a/content/browser/download/mock_download_manager.cc b/content/browser/download/mock_download_manager.cc index 21892ee..58113b7 100644 --- a/content/browser/download/mock_download_manager.cc +++ b/content/browser/download/mock_download_manager.cc @@ -118,7 +118,7 @@ int MockDownloadManager::InProgressCount() const { return 1; } -content::BrowserContext* MockDownloadManager::BrowserContext() const { +content::BrowserContext* MockDownloadManager::GetBrowserContext() const { return NULL; } diff --git a/content/browser/download/mock_download_manager.h b/content/browser/download/mock_download_manager.h index a6415df..ed4f6af 100644 --- a/content/browser/download/mock_download_manager.h +++ b/content/browser/download/mock_download_manager.h @@ -60,7 +60,7 @@ class MockDownloadManager : public content::DownloadManager { virtual void OnItemAddedToPersistentStore(int32 download_id, int64 db_handle) OVERRIDE; virtual int InProgressCount() const OVERRIDE; - virtual content::BrowserContext* BrowserContext() const OVERRIDE; + virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; virtual FilePath LastDownloadPath() OVERRIDE; virtual void CreateDownloadItem( DownloadCreateInfo* info, |