Index: chrome/browser/ui/webui/print_preview/print_preview_handler.h |
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
index f18848109b4f4ab42bbecf5d9e9d774ff9ceca67..e0223081b23bce73114a3d35c354c0e366ded37d 100644 |
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h |
@@ -107,8 +107,10 @@ class PrintPreviewHandler |
void SetPdfSavedClosureForTesting(const base::Closure& closure); |
protected: |
- // If |prompt_user| is true, displays a modal dialog, prompting the user to |
- // select a file. Otherwise, just accept |default_path| and uniquify it. |
+ // If |prompt_user| is true, starts a task to create the default Save As PDF |
+ // directory if needed. OnDirectoryCreated() will be called when it |
+ // finishes to open the modal dialog and prompt the user. Otherwise, just |
+ // accept |default_path| and uniquify it. |
// Protected so unit tests can access. |
virtual void SelectFile(const base::FilePath& default_path, bool prompt_user); |
@@ -262,6 +264,10 @@ class PrintPreviewHandler |
// Clears initiator details for the print preview dialog. |
void ClearInitiatorDetails(); |
+ // Called when the directory to save to has been created. Opens a modal |
+ // dialog to prompt the user to select the file for Save As PDF. |
+ void OnDirectoryCreated(const base::FilePath& path); |
+ |
// Posts a task to save |data| to pdf at |print_to_pdf_path_|. |
void PostPrintToPdfTask(); |