summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/browser/download/download_item_impl.cc6
-rw-r--r--content/browser/download/download_item_impl.h15
-rw-r--r--content/browser/download/download_manager_impl.cc2
-rw-r--r--content/browser/download/download_manager_impl.h4
-rw-r--r--content/browser/download/mock_download_item.h2
-rw-r--r--content/browser/download/mock_download_manager.cc2
-rw-r--r--content/browser/download/mock_download_manager.h2
-rw-r--r--content/public/browser/download_item.h2
-rw-r--r--content/public/browser/download_manager.h2
-rw-r--r--content/shell/shell_download_manager_delegate.cc2
10 files changed, 14 insertions, 25 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,
diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h
index ed597c3..ea6d87b 100644
--- a/content/public/browser/download_item.h
+++ b/content/public/browser/download_item.h
@@ -291,7 +291,7 @@ class CONTENT_EXPORT DownloadItem {
virtual InterruptReason GetLastReason() const = 0;
virtual DownloadPersistentStoreInfo GetPersistentStoreInfo() const = 0;
virtual DownloadStateInfo GetStateInfo() const = 0;
- virtual content::BrowserContext* BrowserContext() const = 0;
+ virtual BrowserContext* GetBrowserContext() const = 0;
virtual TabContents* GetTabContents() const = 0;
// Returns the final target file path for the download.
diff --git a/content/public/browser/download_manager.h b/content/public/browser/download_manager.h
index e8c69f4..a5e31fc 100644
--- a/content/public/browser/download_manager.h
+++ b/content/public/browser/download_manager.h
@@ -182,7 +182,7 @@ class CONTENT_EXPORT DownloadManager
// The number of in progress (including paused) downloads.
virtual int InProgressCount() const = 0;
- virtual content::BrowserContext* BrowserContext() const = 0;
+ virtual content::BrowserContext* GetBrowserContext() const = 0;
virtual FilePath LastDownloadPath() = 0;
diff --git a/content/shell/shell_download_manager_delegate.cc b/content/shell/shell_download_manager_delegate.cc
index cb762c3..6388c74 100644
--- a/content/shell/shell_download_manager_delegate.cc
+++ b/content/shell/shell_download_manager_delegate.cc
@@ -72,7 +72,7 @@ void ShellDownloadManagerDelegate::GenerateFilename(
DownloadStateInfo state,
const FilePath& generated_name) {
if (state.suggested_path.empty()) {
- state.suggested_path = download_manager_->BrowserContext()->GetPath().
+ state.suggested_path = download_manager_->GetBrowserContext()->GetPath().
Append(FILE_PATH_LITERAL("Downloads"));
if (!file_util::PathExists(state.suggested_path))
file_util::CreateDirectory(state.suggested_path);