    }
  
    SetPrintPagesParams(settings);
-@@ -1766,13 +1645,10 @@ bool PrintWebViewHelper::UpdatePrintSettings(
+@@ -1766,13 +1643,10 @@ bool PrintWebViewHelper::UpdatePrintSettings(
    if (PrintMsg_Print_Params_IsValid(settings.params))
      return true;
  

 
 bool PrintWebViewHelper::FinalizePrintReadyDocument() {
   DCHECK(!is_print_ready_metafile_sent_);
@@ -1372,11 +1273,8 @@ bool PrintWebViewHelper::FinalizePrintReadyDocument() {
   Send(new PrintHostMsg_MetafileReadyForPrinting(routing_id(), preview_params));
   return true;
 }

-  UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent",
-                            PREVIEW_EVENT_REQUESTED, PREVIEW_EVENT_MAX);
-
+  blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
+  print_preview_context_.InitWithFrame(frame);
   if (!print_preview_context_.source_frame()) {
     DidFinishPrinting(FAIL_PREVIEW);
     return;
@@ -1144,44 +1131,18 @@ void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
 
   if (!UpdatePrintSettings(print_preview_context_.source_frame(),
                            print_preview_context_.source_node(), settings)) {
-    if (print_preview_context_.last_error() != PREVIEW_ERROR_BAD_SETTING) {
-      Send(new PrintHostMsg_PrintPreviewInvalidPrinterSettings(
