| Index: chrome/browser/ui/page_info/page_info.h
|
| diff --git a/chrome/browser/ui/page_info/website_settings.h b/chrome/browser/ui/page_info/page_info.h
|
| similarity index 80%
|
| rename from chrome/browser/ui/page_info/website_settings.h
|
| rename to chrome/browser/ui/page_info/page_info.h
|
| index d87ec31a4e2dcf688f47570b0e3e4df4049f776a..2fe58b2b9640a01d894321a5e71d3f0b31da2975 100644
|
| --- a/chrome/browser/ui/page_info/website_settings.h
|
| +++ b/chrome/browser/ui/page_info/page_info.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_UI_PAGE_INFO_WEBSITE_SETTINGS_H_
|
| -#define CHROME_BROWSER_UI_PAGE_INFO_WEBSITE_SETTINGS_H_
|
| +#ifndef CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_H_
|
| +#define CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_H_
|
|
|
| #include "base/macros.h"
|
| #include "base/strings/string16.h"
|
| @@ -26,15 +26,15 @@ class ChromeSSLHostStateDelegate;
|
| class ChooserContextBase;
|
| class HostContentSettingsMap;
|
| class Profile;
|
| -class WebsiteSettingsUI;
|
| +class PageInfoUI;
|
|
|
| -// The |WebsiteSettings| provides information about a website's permissions,
|
| +// The |PageInfo| provides information about a website's permissions,
|
| // connection state and its identity. It owns a UI that displays the
|
| -// information and allows users to change the permissions. |WebsiteSettings|
|
| +// information and allows users to change the permissions. |PageInfo|
|
| // objects must be created on the heap. They destroy themselves after the UI is
|
| // closed.
|
| -class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver,
|
| - public content::WebContentsObserver {
|
| +class PageInfo : public TabSpecificContentSettings::SiteDataObserver,
|
| + public content::WebContentsObserver {
|
| public:
|
| // TODO(palmer): Figure out if it is possible to unify SiteConnectionStatus
|
| // and SiteIdentityStatus.
|
| @@ -83,25 +83,25 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver,
|
| SITE_IDENTITY_STATUS_UNWANTED_SOFTWARE,
|
| };
|
|
|
| - // UMA statistics for WebsiteSettings. Do not reorder or remove existing
|
| + // UMA statistics for PageInfo. Do not reorder or remove existing
|
| // fields. A Java counterpart will be generated for this enum.
|
| // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.page_info
|
| - enum WebsiteSettingsAction {
|
| - WEBSITE_SETTINGS_OPENED = 0,
|
| + enum PageInfoAction {
|
| + PAGE_INFO_OPENED = 0,
|
| // No longer used; indicated actions for the old version of Page Info that
|
| // had a "Permissions" tab and a "Connection" tab.
|
| - // WEBSITE_SETTINGS_PERMISSIONS_TAB_SELECTED = 1,
|
| - // WEBSITE_SETTINGS_CONNECTION_TAB_SELECTED = 2,
|
| - // WEBSITE_SETTINGS_CONNECTION_TAB_SHOWN_IMMEDIATELY = 3,
|
| - WEBSITE_SETTINGS_COOKIES_DIALOG_OPENED = 4,
|
| - WEBSITE_SETTINGS_CHANGED_PERMISSION = 5,
|
| - WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED = 6,
|
| + // PAGE_INFO_PERMISSIONS_TAB_SELECTED = 1,
|
| + // PAGE_INFO_CONNECTION_TAB_SELECTED = 2,
|
| + // PAGE_INFO_CONNECTION_TAB_SHOWN_IMMEDIATELY = 3,
|
| + PAGE_INFO_COOKIES_DIALOG_OPENED = 4,
|
| + PAGE_INFO_CHANGED_PERMISSION = 5,
|
| + PAGE_INFO_CERTIFICATE_DIALOG_OPENED = 6,
|
| // No longer used; indicated a UI viewer for SCTs.
|
| - // WEBSITE_SETTINGS_TRANSPARENCY_VIEWER_OPENED = 7,
|
| - WEBSITE_SETTINGS_CONNECTION_HELP_OPENED = 8,
|
| - WEBSITE_SETTINGS_SITE_SETTINGS_OPENED = 9,
|
| - WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED = 10,
|
| - WEBSITE_SETTINGS_COUNT
|
| + // PAGE_INFO_TRANSPARENCY_VIEWER_OPENED = 7,
|
| + PAGE_INFO_CONNECTION_HELP_OPENED = 8,
|
| + PAGE_INFO_SITE_SETTINGS_OPENED = 9,
|
| + PAGE_INFO_SECURITY_DETAILS_OPENED = 10,
|
| + PAGE_INFO_COUNT
|
| };
|
|
|
| struct ChooserUIInfo {
|
| @@ -114,18 +114,18 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver,
|
| const char* ui_name_key;
|
| };
|
|
|
| - // Creates a WebsiteSettings for the passed |url| using the given |ssl| status
|
| + // Creates a PageInfo for the passed |url| using the given |ssl| status
|
| // object to determine the status of the site's connection. The
|
| - // |WebsiteSettings| takes ownership of the |ui|.
|
| - WebsiteSettings(WebsiteSettingsUI* ui,
|
| - Profile* profile,
|
| - TabSpecificContentSettings* tab_specific_content_settings,
|
| - content::WebContents* web_contents,
|
| - const GURL& url,
|
| - const security_state::SecurityInfo& security_info);
|
| - ~WebsiteSettings() override;
|
| + // |PageInfo| takes ownership of the |ui|.
|
| + PageInfo(PageInfoUI* ui,
|
| + Profile* profile,
|
| + TabSpecificContentSettings* tab_specific_content_settings,
|
| + content::WebContents* web_contents,
|
| + const GURL& url,
|
| + const security_state::SecurityInfo& security_info);
|
| + ~PageInfo() override;
|
|
|
| - void RecordWebsiteSettingsAction(WebsiteSettingsAction action);
|
| + void RecordPageInfoAction(PageInfoAction action);
|
|
|
| // This method is called when ever a permission setting is changed.
|
| void OnSitePermissionChanged(ContentSettingsType type, ContentSetting value);
|
| @@ -157,7 +157,7 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver,
|
| void OnSiteDataAccessed() override;
|
|
|
| private:
|
| - // Initializes the |WebsiteSettings|.
|
| + // Initializes the |PageInfo|.
|
| void Init(const GURL& url, const security_state::SecurityInfo& security_info);
|
|
|
| // Sets (presents) the information about the site's permissions in the |ui_|.
|
| @@ -170,11 +170,11 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver,
|
| // in the |ui_|.
|
| void PresentSiteIdentity();
|
|
|
| - // The website settings UI displays information and controls for site-
|
| + // The page info UI displays information and controls for site-
|
| // specific data (local stored objects like cookies), site-specific
|
| // permissions (location, pop-up, plugin, etc. permissions) and site-specific
|
| // information (identity, connection status, etc.).
|
| - WebsiteSettingsUI* ui_;
|
| + PageInfoUI* ui_;
|
|
|
| // The flag that controls whether an infobar is displayed after the website
|
| // settings UI is closed or not.
|
| @@ -235,7 +235,7 @@ class WebsiteSettings : public TabSpecificContentSettings::SiteDataObserver,
|
|
|
| security_state::SecurityLevel security_level_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(WebsiteSettings);
|
| + DISALLOW_COPY_AND_ASSIGN(PageInfo);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_UI_PAGE_INFO_WEBSITE_SETTINGS_H_
|
| +#endif // CHROME_BROWSER_UI_PAGE_INFO_PAGE_INFO_H_
|
|
|