diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/download/download_util.cc | 9 | ||||
-rw-r--r-- | chrome/browser/download/download_util.h | 3 | ||||
-rw-r--r-- | chrome/browser/extensions/api/debugger/debugger_api.cc | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/render_view_context_menu.cc | 3 | ||||
-rw-r--r-- | chrome/browser/ui/browser_commands.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc | 1 |
6 files changed, 6 insertions, 16 deletions
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc index ca4db0d..1959f09 100644 --- a/chrome/browser/download/download_util.cc +++ b/chrome/browser/download/download_util.cc @@ -459,15 +459,6 @@ string16 GetProgressStatusText(DownloadItem* download) { speed_text, amount, time_remaining); } -bool IsSavableURL(const GURL& url) { - for (int i = 0; content::GetSavableSchemes()[i] != NULL; ++i) { - if (url.SchemeIs(content::GetSavableSchemes()[i])) { - return true; - } - } - return false; -} - void RecordShelfClose(int size, int in_progress, bool autoclose) { static const int kMaxShelfSize = 16; if (autoclose) { diff --git a/chrome/browser/download/download_util.h b/chrome/browser/download/download_util.h index 6494254..b74afbf 100644 --- a/chrome/browser/download/download_util.h +++ b/chrome/browser/download/download_util.h @@ -143,9 +143,6 @@ void DragDownload(const content::DownloadItem* download, // Get the localized status text for an in-progress download. string16 GetProgressStatusText(content::DownloadItem* download); -// Check whether we can do the saving page operation for the specified URL. -bool IsSavableURL(const GURL& url); - // Record the total number of items and the number of in-progress items showing // in the shelf when it closes. Set |autoclose| to true when the shelf is // closing itself, false when the user explicitly closed it. diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc index ab24aee..3a52784 100644 --- a/chrome/browser/extensions/api/debugger/debugger_api.cc +++ b/chrome/browser/extensions/api/debugger/debugger_api.cc @@ -44,7 +44,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/worker_service.h" #include "content/public/common/content_client.h" -#include "content/public/common/url_constants.h" +#include "content/public/common/url_utils.h" #include "extensions/common/error_utils.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 8ec1eb0..914e60c 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -80,6 +80,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/common/content_restriction.h" #include "content/public/common/ssl_status.h" +#include "content/public/common/url_utils.h" #include "extensions/browser/view_type_utils.h" #include "grit/generated_resources.h" #include "net/base/escape.h" @@ -1341,7 +1342,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const { // different (like having "view-source:" on the front). NavigationEntry* active_entry = source_web_contents_->GetController().GetActiveEntry(); - return download_util::IsSavableURL( + return content::IsSavableURL( (active_entry) ? active_entry->GetURL() : GURL()); } diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc index cd166835..09eaff5 100644 --- a/chrome/browser/ui/browser_commands.cc +++ b/chrome/browser/ui/browser_commands.cc @@ -16,7 +16,6 @@ #include "chrome/browser/browsing_data/browsing_data_remover.h" #include "chrome/browser/chrome_page_zoom.h" #include "chrome/browser/devtools/devtools_window.h" -#include "chrome/browser/download/download_util.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/tab_helper.h" #include "chrome/browser/favicon/favicon_tab_helper.h" @@ -71,6 +70,7 @@ #include "content/public/common/content_restriction.h" #include "content/public/common/renderer_preferences.h" #include "content/public/common/url_constants.h" +#include "content/public/common/url_utils.h" #include "net/base/escape.h" #include "webkit/glue/glue_serialize.h" #include "webkit/user_agent/user_agent_util.h" @@ -247,7 +247,7 @@ int GetContentRestrictions(const Browser* browser) { NavigationEntry* active_entry = current_tab->GetController().GetActiveEntry(); // See comment in UpdateCommandsForTabState about why we call url(). - if (!download_util::IsSavableURL( + if (!content::IsSavableURL( active_entry ? active_entry->GetURL() : GURL()) || current_tab->ShowingInterstitialPage()) content_restrictions |= content::CONTENT_RESTRICTION_SAVE; diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index 29ef6a4..ad254cd 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc @@ -58,6 +58,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" #include "content/public/common/content_client.h" +#include "content/public/common/url_utils.h" #include "extensions/common/constants.h" #include "googleurl/src/gurl.h" #include "ui/gfx/favicon_size.h" |