Print preview: Use an ID instead of memory pointer string in WebUI.

BUG=144051

Review URL: https://chromiumcodereview.appspot.com/10870003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153342 0039d316-1c4b-4281-b951-d872f2087c98
void PrintPreviewHandler::FileSelected(const FilePath& path,
                                       int index, void* params) {
  GetStickySettings()->StoreSavePath(path.DirName());

  PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
      web_ui()->GetController());
  print_preview_ui->web_ui()->CallJavascriptFunction("fileSelectionCompleted");
  scoped_refptr<base::RefCountedBytes> data;
  print_preview_ui->GetPrintPreviewDataForIndex(
      printing::COMPLETE_PREVIEW_DOCUMENT_INDEX, &data);
  print_to_pdf_path_.reset(new FilePath(path));
  PostPrintToPdfTask(data);
}

void PrintPreviewHandler::FileSelected(const FilePath& path,
                                       int index, void* params) {
  GetStickySettings()->StoreSavePath(path.DirName());

  PrintPreviewUI* print_preview_ui = static_cast<PrintPreviewUI*>(
      web_ui()->GetController());
  print_preview_ui->web_ui()->CallJavascriptFunction("fileSelectionCompleted");
  scoped_refptr<base::RefCountedBytes> data;
  print_preview_ui->GetPrintPreviewDataForIndex(
      printing::COMPLETE_PREVIEW_DOCUMENT_INDEX, &data);
  print_to_pdf_path_.reset(new FilePath(path));
  PostPrintToPdfTask(data);
}
