Skip to content

Commit

Permalink
Plugin Power Saver: Replace all "plug-in" with "plugin" for consistency.
Browse files Browse the repository at this point in the history
Passed chrome-ui-review: https://groups.google.com/a/google.com/d/msg/chrome-ui-review/FwuQ2TWc5n8/H3PSuV4L_cAJ

BUG=467165

TBR=tsepez
(comment changes only in render_messages)

NOPRESUBMIT=true
(legacy LOG messages)

Review URL: https://codereview.chromium.org/1007443004

Cr-Commit-Position: refs/heads/master@{#320782}
  • Loading branch information
tommycli authored and Commit bot committed Mar 16, 2015
1 parent 8f76126 commit e86b298
Show file tree
Hide file tree
Showing 126 changed files with 428 additions and 428 deletions.
2 changes: 1 addition & 1 deletion build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@
# Use experimental lld linker instead of the platform's default linker.
'use_lld%': 0,

# Enable plug-in installation by default.
# Enable plugin installation by default.
'enable_plugin_installation%': 1,

# Specifies whether to use canvas_skia.cc in place of platform
Expand Down
4 changes: 2 additions & 2 deletions chrome/app/chromium_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ be available for now. -->
https://support.google.com/chrome/?p=ib_chromeframe
</message>
<message name="IDS_CHROME_FRAME_TURNDOWN_TEXT_IE_OLDER" desc="Text of Chromium Frame turndown prompt for IE 6, 7, and 8">
This site is using the Chromium Frame plug-in which will soon be unsupported. Please uninstall it and upgrade to a modern browser.
This site is using the Chromium Frame plugin which will soon be unsupported. Please uninstall it and upgrade to a modern browser.
</message>
<message name="IDS_CHROME_FRAME_TURNDOWN_TEXT_IE_NEWER" desc="Text of Chromium Frame turndown prompt for IE 9 and 10">
This site is using the Chromium Frame plug-in that will soon be unsupported. Please uninstall it and download a compatible browser.
This site is using the Chromium Frame plugin that will soon be unsupported. Please uninstall it and download a compatible browser.
</message>
<message name="IDS_SHORTCUT_NEW_WINDOW" desc="The text label of the New window shortcut context menu entry as of Windows 8">
New window
Expand Down
206 changes: 103 additions & 103 deletions chrome/app/generated_resources.grd

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions chrome/app/google_chrome_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ Chrome supports. -->
https://support.google.com/chrome/?p=ib_chromeframe
</message>
<message name="IDS_CHROME_FRAME_TURNDOWN_TEXT_IE_OLDER" desc="Text of Chrome Frame turndown prompt for IE 6, 7, and 8">
This site is using the retired Chrome Frame plug-in which no longer receives security and stability updates. Please uninstall it and upgrade to a modern browser.
This site is using the retired Chrome Frame plugin which no longer receives security and stability updates. Please uninstall it and upgrade to a modern browser.
</message>
<message name="IDS_CHROME_FRAME_TURNDOWN_TEXT_IE_NEWER" desc="Text of Chrome Frame turndown prompt for IE 9 and 10">
This site is using the retired Chrome Frame plug-in which no longer receives security and stability updates. Please uninstall it and upgrade to a modern browser.
This site is using the retired Chrome Frame plugin which no longer receives security and stability updates. Please uninstall it and upgrade to a modern browser.
</message>
<message name="IDS_SHORTCUT_NEW_WINDOW" desc="The text label of the New window shortcut context menu entry as of Windows 8">
New window
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/browsing_data/browsing_data_remover.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class BrowsingDataRemover
// clears the respective waiting flag, and invokes NotifyAndDeleteIfDone.
void OnKeywordsLoaded();

// Called when plug-in data has been cleared. Invokes NotifyAndDeleteIfDone.
// Called when plugin data has been cleared. Invokes NotifyAndDeleteIfDone.
void OnWaitableEventSignaled(base::WaitableEvent* waitable_event);

#if defined(ENABLE_PLUGINS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ bool MakePepperFlashPluginInfo(const base::FilePath& flash_path,

bool IsPepperFlash(const content::WebPluginInfo& plugin) {
// We try to recognize Pepper Flash by the following criteria:
// * It is a Pepper plug-in.
// * It is a Pepper plugin.
// * It has the special Flash permissions.
return plugin.is_pepper_plugin() &&
(plugin.pepper_permissions & ppapi::PERMISSION_FLASH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ IN_PROC_BROWSER_TEST_F(PepperContentSettingsSpecialCasesTest, Baseline) {
#endif // defined(ENABLE_PEPPER_CDMS)

// The following tests verify that Pepper plugins that use JavaScript settings
// instead of Plug-ins settings still work when Plug-ins are blocked.
// instead of Plugins settings still work when Plugins are blocked.

#if defined(ENABLE_PEPPER_CDMS)
// The plugin successfully loaded above is blocked.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,7 @@ TEST_F(DownloadTargetDeterminerTestWithPlugin,
GetPathInDownloadDir(kInitialPath), item.get());
EXPECT_FALSE(target_info->is_filetype_handled_safely);

// Now register an unsandboxed PPAPI plug-in. This plugin should not be
// Now register an unsandboxed PPAPI plugin. This plugin should not be
// considered secure.
ScopedRegisterInternalPlugin ppapi_unsandboxed_plugin(
plugin_service,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/download/download_target_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct DownloadTargetInfo {
// Whether the |target_path| would be handled safely by the browser if it were
// to be opened with a file:// URL. This can be used later to decide how file
// opens should be handled. The file is considered to be handled safely if the
// filetype is supported by the renderer or a sandboxed plug-in.
// filetype is supported by the renderer or a sandboxed plugin.
bool is_filetype_handled_safely;
};

Expand Down
10 changes: 5 additions & 5 deletions chrome/browser/extensions/plugin_apitest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PluginPrivate) {
#if defined(OS_CHROMEOS)
EXPECT_FALSE(result);
#else
// TODO(bauerb): This might wrongly fail if the plug-in takes too long
// to load. Extension-private plug-ins don't appear in navigator.plugins, so
// we can't check for the plug-in in Javascript.
// TODO(bauerb): This might wrongly fail if the plugin takes too long
// to load. Extension-private plugins don't appear in navigator.plugins, so
// we can't check for the plugin in Javascript.
EXPECT_TRUE(result);
#endif

// Regression test for http://crbug.com/131811: The plug-in should be
// Regression test for http://crbug.com/131811: The plugin should be
// whitelisted for the extension (and only for the extension), so it should be
// loaded even if content settings are set to block plug-ins.
// loaded even if content settings are set to block plugins.
browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
CONTENT_SETTINGS_TYPE_PLUGINS, CONTENT_SETTING_BLOCK);
ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/plugin_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PluginManager : public BrowserContextKeyedAPI,

#if !defined(DISABLE_NACL)

// We implement some Pepper plug-ins using NaCl to take advantage of NaCl's
// We implement some Pepper plugins using NaCl to take advantage of NaCl's
// strong sandbox. Typically, these NaCl modules are stored in extensions
// and registered here. Not all NaCl modules need to register for a MIME
// type, just the ones that are responsible for rendering a particular MIME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static const char kWebRtcAudioTestHtmlPage[] =
// 2. For the user who will run the test: # pavucontrol
// 3. In a separate terminal, # arecord dummy
// 4. In pavucontrol, go to the recording tab.
// 5. For the ALSA plug-in [aplay]: ALSA Capture from, change from <x> to
// 5. For the ALSA plugin [aplay]: ALSA Capture from, change from <x> to
// <Monitor of x>, where x is whatever your primary sound device is called.
// 6. Try launching chrome as the target user on the target machine, try
// playing, say, a YouTube video, and record with # arecord -f dat tmp.dat.
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/metrics/plugin_metrics_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ void PluginMetricsProvider::LogPluginLoadingError(
ChildProcessStats& stats = child_process_stats_buffer_[plugin.name];
// Initialize the type if this entry is new.
if (stats.process_type == content::PROCESS_TYPE_UNKNOWN) {
// The plug-in process might not actually be of type PLUGIN (which means
// NPAPI), but we only care that it is *a* plug-in process.
// The plugin process might not actually be of type PLUGIN (which means
// NPAPI), but we only care that it is *a* plugin process.
stats.process_type = content::PROCESS_TYPE_PLUGIN;
} else {
DCHECK(IsPluginProcess(stats.process_type));
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/pepper_broker_infobar_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace content {
class WebContents;
}

// Shows an infobar that asks the user whether a Pepper plug-in is allowed
// Shows an infobar that asks the user whether a Pepper plugin is allowed
// to connect to its (privileged) broker. The user decision is made "sticky"
// by storing a content setting for the site.
class PepperBrokerInfoBarDelegate : public ConfirmInfoBarDelegate {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/plugins/chrome_plugin_service_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(

bool ChromePluginServiceFilter::CanLoadPlugin(int render_process_id,
const base::FilePath& path) {
// The browser itself sometimes loads plug-ins to e.g. clear plug-in data.
// The browser itself sometimes loads plugins to e.g. clear plugin data.
// We always grant the browser permission.
if (!render_process_id)
return true;
Expand Down
6 changes: 3 additions & 3 deletions chrome/browser/plugins/chrome_plugin_service_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter,
Profile* profile,
const GURL& url);

// Lifts a restriction on a plug-in.
// Lifts a restriction on a plugin.
void UnrestrictPlugin(const base::FilePath& plugin_path);

// Authorizes a given plug-in for a given process.
// Authorizes a given plugin for a given process.
void AuthorizePlugin(int render_process_id,
const base::FilePath& plugin_path);

// Authorizes all plug-ins for a given WebContents. If |load_blocked| is true,
// Authorizes all plugins for a given WebContents. If |load_blocked| is true,
// then the renderer is told to load the plugin with given |identifier| (or
// pllugins if |identifier| is empty).
// This method can only be called on the UI thread.
Expand Down
8 changes: 4 additions & 4 deletions chrome/browser/plugins/plugin_finder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace {

typedef std::map<std::string, PluginMetadata*> PluginMap;

// Gets the full path of the plug-in file as the identifier.
// Gets the full path of the plugin file as the identifier.
std::string GetLongIdentifier(const content::WebPluginInfo& plugin) {
return plugin.path.AsUTF8Unsafe();
}
Expand All @@ -43,7 +43,7 @@ std::string GetIdentifier(const content::WebPluginInfo& plugin) {
return plugin.path.BaseName().AsUTF8Unsafe();
}

// Gets the plug-in group name as the plug-in name if it is not empty or
// Gets the plugin group name as the plugin name if it is not empty or
// the filename without extension if the name is empty.
static base::string16 GetGroupName(const content::WebPluginInfo& plugin) {
if (!plugin.name.empty())
Expand Down Expand Up @@ -148,7 +148,7 @@ PluginFinder::PluginFinder() : version_(-1) {

void PluginFinder::Init() {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
// Load the built-in plug-in list first. If we have a newer version stored
// Load the built-in plugin list first. If we have a newer version stored
// locally or download one, we will replace this one with it.
scoped_ptr<base::DictionaryValue> plugin_list(LoadBuiltInPluginList());
DCHECK(plugin_list);
Expand Down Expand Up @@ -280,7 +280,7 @@ scoped_ptr<PluginMetadata> PluginFinder::GetPluginMetadata(
return it->second->Clone();
}

// The plug-in metadata was not found, create a dummy one holding
// The plugin metadata was not found, create a dummy one holding
// the name, identifier and group name only.
std::string identifier = GetIdentifier(plugin);
PluginMetadata* metadata = new PluginMetadata(identifier,
Expand Down
12 changes: 6 additions & 6 deletions chrome/browser/plugins/plugin_finder.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PluginFinder {
void ReinitializePlugins(const base::DictionaryValue* json_metadata);

#if defined(ENABLE_PLUGIN_INSTALLATION)
// Finds a plug-in for the given MIME type and language (specified as an IETF
// Finds a plugin for the given MIME type and language (specified as an IETF
// language tag, i.e. en-US). If found, sets |installer| to the
// corresponding PluginInstaller and |plugin_metadata| to a copy of the
// corresponding PluginMetadata.
Expand All @@ -52,18 +52,18 @@ class PluginFinder {
PluginInstaller** installer,
scoped_ptr<PluginMetadata>* plugin_metadata);

// Finds the plug-in with the given identifier. If found, sets |installer|
// Finds the plugin with the given identifier. If found, sets |installer|
// to the corresponding PluginInstaller and |plugin_metadata| to a copy
// of the corresponding PluginMetadata. |installer| may be NULL.
bool FindPluginWithIdentifier(const std::string& identifier,
PluginInstaller** installer,
scoped_ptr<PluginMetadata>* plugin_metadata);
#endif

// Returns the plug-in name with the given identifier.
// Returns the plugin name with the given identifier.
base::string16 FindPluginNameWithIdentifier(const std::string& identifier);

// Gets plug-in metadata using |plugin|.
// Gets plugin metadata using |plugin|.
scoped_ptr<PluginMetadata> GetPluginMetadata(
const content::WebPluginInfo& plugin);

Expand All @@ -76,8 +76,8 @@ class PluginFinder {
PluginFinder();
~PluginFinder();

// Loads the plug-in information from the browser resources and parses it.
// Returns NULL if the plug-in list couldn't be parsed.
// Loads the plugin information from the browser resources and parses it.
// Returns NULL if the plugin list couldn't be parsed.
static base::DictionaryValue* LoadBuiltInPluginList();

#if defined(ENABLE_PLUGIN_INSTALLATION)
Expand Down
16 changes: 8 additions & 8 deletions chrome/browser/plugins/plugin_info_message_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT;
bool uses_default_content_setting = true;
bool is_managed = false;
// Check plug-in content settings. The primary URL is the top origin URL and
// the secondary URL is the plug-in URL.
// Check plugin content settings. The primary URL is the top origin URL and
// the secondary URL is the plugin URL.
GetPluginContentSetting(plugin, params.top_origin_url, params.url,
plugin_metadata->identifier(), &plugin_setting,
&uses_default_content_setting, &is_managed);
Expand All @@ -361,7 +361,7 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
PluginMetadata::SecurityStatus plugin_status =
plugin_metadata->GetSecurityStatus(plugin);
#if defined(ENABLE_PLUGIN_INSTALLATION)
// Check if the plug-in is outdated.
// Check if the plugin is outdated.
if (plugin_status == PluginMetadata::SECURITY_STATUS_OUT_OF_DATE &&
!allow_outdated_plugins_.GetValue()) {
if (allow_outdated_plugins_.IsManaged()) {
Expand All @@ -373,13 +373,13 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
return;
}
#endif
// Check if the plug-in or its group is enabled by policy.
// Check if the plugin or its group is enabled by policy.
PluginPrefs::PolicyStatus plugin_policy =
plugin_prefs_->PolicyStatusForPlugin(plugin.name);
PluginPrefs::PolicyStatus group_policy =
plugin_prefs_->PolicyStatusForPlugin(plugin_metadata->name());

// Check if the plug-in requires authorization.
// Check if the plugin requires authorization.
if (plugin_status ==
PluginMetadata::SECURITY_STATUS_REQUIRES_AUTHORIZATION &&
plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS &&
Expand All @@ -396,7 +396,7 @@ void PluginInfoMessageFilter::Context::DecidePluginStatus(
return;
}

// Check if the plug-in is crashing too much.
// Check if the plugin is crashing too much.
if (PluginService::GetInstance()->IsPluginUnstable(plugin.path) &&
!always_authorize_plugins_.GetValue() &&
plugin_setting != CONTENT_SETTING_BLOCK &&
Expand Down Expand Up @@ -473,10 +473,10 @@ bool PluginInfoMessageFilter::Context::FindEnabledPlugin(
}
}

// If we broke out of the loop, we have found an enabled plug-in.
// If we broke out of the loop, we have found an enabled plugin.
bool enabled = i < matching_plugins.size();
if (!enabled) {
// Otherwise, we only found disabled plug-ins, so we take the first one.
// Otherwise, we only found disabled plugins, so we take the first one.
i = 0;
status->value = ChromeViewHostMsg_GetPluginInfo_Status::kDisabled;
}
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/plugins/plugin_info_message_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace extensions {
class ExtensionRegistry;
}

// This class filters out incoming IPC messages requesting plug-in information.
// This class filters out incoming IPC messages requesting plugin information.
class PluginInfoMessageFilter : public content::BrowserMessageFilter {
public:
struct GetPluginInfo_Params;
Expand Down
10 changes: 5 additions & 5 deletions chrome/browser/plugins/plugin_info_message_filter_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bool FakePluginServiceFilter::IsPluginAvailable(
std::map<base::FilePath, bool>::iterator it =
plugin_state_.find(plugin->path);
if (it == plugin_state_.end()) {
ADD_FAILURE() << "No plug-in state for '" << plugin->path.value() << "'";
ADD_FAILURE() << "No plugin state for '" << plugin->path.value() << "'";
return false;
}
return it->second;
Expand All @@ -86,21 +86,21 @@ class PluginInfoMessageFilterTest : public ::testing::Test {
}

void SetUp() override {
content::WebPluginInfo foo_plugin(base::ASCIIToUTF16("Foo Plug-in"),
content::WebPluginInfo foo_plugin(base::ASCIIToUTF16("Foo Plugin"),
foo_plugin_path_,
base::ASCIIToUTF16("1"),
base::ASCIIToUTF16("The Foo plug-in."));
base::ASCIIToUTF16("The Foo plugin."));
content::WebPluginMimeType mime_type;
mime_type.mime_type = "foo/bar";
foo_plugin.mime_types.push_back(mime_type);
foo_plugin.type = content::WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS;
PluginService::GetInstance()->Init();
PluginService::GetInstance()->RegisterInternalPlugin(foo_plugin, false);

content::WebPluginInfo bar_plugin(base::ASCIIToUTF16("Bar Plug-in"),
content::WebPluginInfo bar_plugin(base::ASCIIToUTF16("Bar Plugin"),
bar_plugin_path_,
base::ASCIIToUTF16("1"),
base::ASCIIToUTF16("The Bar plug-in."));
base::ASCIIToUTF16("The Bar plugin."));
mime_type.mime_type = "foo/bar";
bar_plugin.mime_types.push_back(mime_type);
bar_plugin.type = content::WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS;
Expand Down
8 changes: 4 additions & 4 deletions chrome/browser/plugins/plugin_infobar_delegates.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace content {
class WebContents;
}

// Base class for blocked plug-in infobars.
// Base class for blocked plugin infobars.
class PluginInfoBarDelegate : public ConfirmInfoBarDelegate {
protected:
explicit PluginInfoBarDelegate(const std::string& identifier);
Expand All @@ -45,7 +45,7 @@ class PluginInfoBarDelegate : public ConfirmInfoBarDelegate {
};

#if defined(ENABLE_PLUGIN_INSTALLATION)
// Infobar that's shown when a plug-in is out of date.
// Infobar that's shown when a plugin is out of date.
class OutdatedPluginInfoBarDelegate : public PluginInfoBarDelegate,
public WeakPluginInstallerObserver {
public:
Expand Down Expand Up @@ -99,7 +99,7 @@ class PluginInstallerInfoBarDelegate : public ConfirmInfoBarDelegate,

// Shows an infobar asking whether to install the plugin represented by
// |installer|. When the user accepts, |callback| is called.
// During installation of the plug-in, the infobar will change to reflect the
// During installation of the plugin, the infobar will change to reflect the
// installation state.
static void Create(InfoBarService* infobar_service,
PluginInstaller* installer,
Expand Down Expand Up @@ -148,7 +148,7 @@ class PluginInstallerInfoBarDelegate : public ConfirmInfoBarDelegate,

InstallCallback callback_;

// True iff the plug-in isn't installed yet.
// True iff the plugin isn't installed yet.
bool new_install_;

base::string16 message_;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/plugins/plugin_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool PluginMetadata::HasMimeType(const std::string& mime_type) const {
bool PluginMetadata::MatchesPlugin(const content::WebPluginInfo& plugin) {
for (size_t i = 0; i < matching_mime_types_.size(); ++i) {
// To have a match, every one of the |matching_mime_types_|
// must be handled by the plug-in.
// must be handled by the plugin.
size_t j = 0;
for (; j < plugin.mime_types.size(); ++j) {
if (plugin.mime_types[j].mime_type == matching_mime_types_[i])
Expand Down
Loading

0 comments on commit e86b298

Please sign in to comment.