Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9099)

Unified Diff: chrome/common/extensions/extension.cc

Issue 2101019: Print Preview component extension (Closed)
Patch Set: Put it under a flag Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index b8c516300da2393989e0e625e49031d1e633c9ed..1de19cc23c8ecc3ab0565f4add4535028ecfa94e 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -206,7 +206,6 @@ bool Extension::GenerateId(const std::string& input, std::string* output) {
CHECK(output);
if (input.length() == 0)
return false;
-
const uint8* ubuf = reinterpret_cast<const unsigned char*>(input.data());
SHA256Context ctx;
SHA256_Begin(&ctx);
@@ -215,7 +214,6 @@ bool Extension::GenerateId(const std::string& input, std::string* output) {
SHA256_End(&ctx, hash, NULL, sizeof(hash));
*output = StringToLowerASCII(HexEncode(hash, sizeof(hash)));
ConvertHexadecimalToIDAlphabet(output);
-
return true;
}
@@ -1448,7 +1446,8 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_key,
// Restrict override pages to a list of supported URLs.
if ((page != chrome::kChromeUINewTabHost &&
page != chrome::kChromeUIBookmarksHost &&
- page != chrome::kChromeUIHistoryHost) ||
+ page != chrome::kChromeUIHistoryHost &&
+ page != chrome::kChromeUIPrintPreviewHost) ||
!overrides->GetStringWithoutPathExpansion(*iter, &val)) {
*error = errors::kInvalidChromeURLOverrides;
return false;
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/common/url_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698