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

Unified Diff: printing/printing_context.cc

Issue 12207199: Removed invalid NOTREACHED. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context.cc
diff --git a/printing/printing_context.cc b/printing/printing_context.cc
index 407e3bb4c66c1c12e34c12e072664d1dbcedd8d5..98ea11cba795b08231ed69111db57f640777de3b 100644
--- a/printing/printing_context.cc
+++ b/printing/printing_context.cc
@@ -47,10 +47,8 @@ PrintingContext::Result PrintingContext::UpdatePrintSettings(
const PageRanges& ranges) {
ResetSettings();
- if (!job_settings.GetBoolean(kSettingHeaderFooterEnabled,
- &settings_.display_header_footer)) {
- NOTREACHED();
- }
+ job_settings.GetBoolean(kSettingHeaderFooterEnabled,
+ &settings_.display_header_footer);
int margin_type = DEFAULT_MARGINS;
if (!job_settings.GetInteger(kSettingMarginsType, &margin_type) ||
@@ -58,7 +56,7 @@ PrintingContext::Result PrintingContext::UpdatePrintSettings(
margin_type != NO_MARGINS &&
margin_type != CUSTOM_MARGINS &&
margin_type != PRINTABLE_AREA_MARGINS)) {
- NOTREACHED();
+ margin_type = DEFAULT_MARGINS;
}
settings_.margin_type = static_cast<MarginType>(margin_type);
@@ -79,16 +77,10 @@ PrintingContext::Result PrintingContext::UpdatePrintSettings(
PrintingContext::Result result = UpdatePrinterSettings(job_settings, ranges);
PrintSettingsInitializer::InitHeaderFooterStrings(job_settings, &settings_);
- if (!job_settings.GetBoolean(kSettingShouldPrintBackgrounds,
- &settings_.should_print_backgrounds)) {
- NOTREACHED();
- }
-
- if (!job_settings.GetBoolean(kSettingShouldPrintSelectionOnly,
- &settings_.selection_only)) {
- NOTREACHED();
- }
-
+ job_settings.GetBoolean(kSettingShouldPrintBackgrounds,
+ &settings_.should_print_backgrounds);
+ job_settings.GetBoolean(kSettingShouldPrintSelectionOnly,
+ &settings_.selection_only);
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698