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

Unified Diff: chromeos/printing/ppd_cache.h

Issue 2487343006: Add in-memory caching to PpdCache available printers. (Closed)
Patch Set: Created 4 years, 1 month 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 | chromeos/printing/ppd_cache.cc » ('j') | chromeos/printing/ppd_cache.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/printing/ppd_cache.h
diff --git a/chromeos/printing/ppd_cache.h b/chromeos/printing/ppd_cache.h
index f18cc2064d979c8c1142b907537048024bc062c4..e229d15c3ab1758c09f76276d67401b618d38e5b 100644
--- a/chromeos/printing/ppd_cache.h
+++ b/chromeos/printing/ppd_cache.h
@@ -73,13 +73,15 @@ class CHROMEOS_EXPORT PpdCache {
const std::string& ppd_contents) = 0;
// Return a map of available printers, if we have one available and it's
- // not too stale.
- virtual base::Optional<PpdProvider::AvailablePrintersMap>
- FindAvailablePrinters() = 0;
+ // not too stale. Returns null if no map is available.
+ //
+ // If a map is returned, ownership is retained by the cache.
+ virtual const PpdProvider::AvailablePrintersMap* FindAvailablePrinters() = 0;
skau 2016/11/10 20:46:37 Make a note of the expected lifetime of the map i.
Carlson 2016/11/11 01:39:27 Done.
// Store |available_printers|, replacing any existing entry.
virtual void StoreAvailablePrinters(
- const PpdProvider::AvailablePrintersMap& available_printers) = 0;
+ std::unique_ptr<PpdProvider::AvailablePrintersMap>
+ available_printers) = 0;
};
} // namespace printing
« no previous file with comments | « no previous file | chromeos/printing/ppd_cache.cc » ('j') | chromeos/printing/ppd_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698