summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlauren.yeun.kim@gmail.com <lauren.yeun.kim@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-29 20:20:27 +0000
committerlauren.yeun.kim@gmail.com <lauren.yeun.kim@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-29 20:20:27 +0000
commit1b9280945c21d017d8ebe852655e1038b10996fc (patch)
tree46620806753e88e681fcf765603387d3a88dfa54
parent3e76f714c767ab379fab8c952a63a2711bc4f384 (diff)
downloadchromium_src-1b9280945c21d017d8ebe852655e1038b10996fc.zip
chromium_src-1b9280945c21d017d8ebe852655e1038b10996fc.tar.gz
chromium_src-1b9280945c21d017d8ebe852655e1038b10996fc.tar.bz2
Cleanup: style fixes in /extensions/common
Changes: 1) intend +2 spaces in manifest_handler_unittest.cc 2) use DCHECK_NE instead of DCHECK(A != B) in extension_icon_set.cc 3) use CHEKC_EQ instead of CHECK(A == B) in manifest_handler.cc Because types of A and B are different, B is converted to the type of A explicitly. 4) mark explicit to a single-argument constructor in install_warning.h BUG= Review URL: https://codereview.chromium.org/304063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273572 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--extensions/common/extension_icon_set.cc2
-rw-r--r--extensions/common/install_warning.h2
-rw-r--r--extensions/common/manifest_handler.cc4
-rw-r--r--extensions/common/manifest_handler_unittest.cc2
4 files changed, 5 insertions, 5 deletions
diff --git a/extensions/common/extension_icon_set.cc b/extensions/common/extension_icon_set.cc
index a91b9bc..5ca431f 100644
--- a/extensions/common/extension_icon_set.cc
+++ b/extensions/common/extension_icon_set.cc
@@ -57,7 +57,7 @@ int ExtensionIconSet::GetIconSizeFromPath(const std::string& path) const {
if (path.empty())
return 0;
- DCHECK(path[0] != '/') <<
+ DCHECK_NE(path[0], '/') <<
"ExtensionIconSet stores icon paths without leading slash.";
for (IconMap::const_iterator iter = map_.begin(); iter != map_.end();
diff --git a/extensions/common/install_warning.h b/extensions/common/install_warning.h
index d071098..ca79477 100644
--- a/extensions/common/install_warning.h
+++ b/extensions/common/install_warning.h
@@ -13,7 +13,7 @@ namespace extensions {
// A struct to describe a non-fatal issue discovered in the installation of an
// extension.
struct InstallWarning {
- InstallWarning(const std::string& message);
+ explicit InstallWarning(const std::string& message);
InstallWarning(const std::string& message,
const std::string& key);
InstallWarning(const std::string& message,
diff --git a/extensions/common/manifest_handler.cc b/extensions/common/manifest_handler.cc
index ff0495c..78df1cd 100644
--- a/extensions/common/manifest_handler.cc
+++ b/extensions/common/manifest_handler.cc
@@ -243,8 +243,8 @@ void ManifestHandlerRegistry::SortManifestHandlers() {
// If there are any leftover unsorted handlers, they must have had
// circular dependencies.
- CHECK(unsorted_handlers.size() == 0) << "Extension manifest handlers have "
- << "circular dependencies!";
+ CHECK_EQ(unsorted_handlers.size(), std::set<ManifestHandler*>::size_type(0))
+ << "Extension manifest handlers have circular dependencies!";
}
} // namespace extensions
diff --git a/extensions/common/manifest_handler_unittest.cc b/extensions/common/manifest_handler_unittest.cc
index 1da6b40..4709537 100644
--- a/extensions/common/manifest_handler_unittest.cc
+++ b/extensions/common/manifest_handler_unittest.cc
@@ -161,7 +161,7 @@ class ManifestHandlerTest : public testing::Test {
return keys_;
}
- protected:
+ protected:
bool return_value_;
bool always_validate_;
std::vector<std::string> keys_;