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

Unified Diff: pdf/pdfium/pdfium_engine.h

Issue 2000323005: PDF: Use an empty password as a sentinel value for no password. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.h
diff --git a/pdf/pdfium/pdfium_engine.h b/pdf/pdfium/pdfium_engine.h
index ec3c80dcce9376ea7b79441ede33ba8995a2b355..d17de8275c178074faefbe88b01bea98920dc5d4 100644
--- a/pdf/pdfium/pdfium_engine.h
+++ b/pdf/pdfium/pdfium_engine.h
@@ -204,13 +204,10 @@ class PDFiumEngine : public PDFEngine,
void LoadDocument();
// Try loading the document. Returns true if the document is successfully
- // loaded or is already loaded otherwise it will return false. If
- // |with_password| is set to true, the document will be loaded with
- // |password|. If the document could not be loaded and needs a password,
- // |needs_password| will be set to true.
- bool TryLoadingDoc(bool with_password,
- const std::string& password,
- bool* needs_password);
+ // loaded or is already loaded otherwise it will return false. If there is a
+ // password, then |password| is non-empty. If the document could not be loaded
+ // and needs a password, |needs_password| will be set to true.
+ bool TryLoadingDoc(const std::string& password, bool* needs_password);
// Ask the user for the document password and then continue loading the
// document.
@@ -221,9 +218,8 @@ class PDFiumEngine : public PDFEngine,
const pp::Var& password);
// Continues loading the document when the password has been retrieved, or if
- // there is no password.
- void ContinueLoadingDocument(bool has_password,
- const std::string& password);
+ // there is no password. If there is no password, then |password| is empty.
+ void ContinueLoadingDocument(const std::string& password);
// Finish loading the document and notify the client that the document has
// been loaded. This should only be run after |doc_| has been loaded and the
« no previous file with comments | « no previous file | pdf/pdfium/pdfium_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698