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

Unified Diff: chromeos/printing/ppd_cache.h

Issue 2487343006: Add in-memory caching to PpdCache available printers. (Closed)
Patch Set: Address thestig@ comment 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') | no next file with comments »
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..d44eeb5372d1dcb0301b85d3f45986f81fbd1176 100644
--- a/chromeos/printing/ppd_cache.h
+++ b/chromeos/printing/ppd_cache.h
@@ -73,13 +73,17 @@ 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. The map is
+ // guaranteed to remain valid and unchanged until the next
+ // {Find|Store}AvailablePrinters call.
+ virtual const PpdProvider::AvailablePrintersMap* FindAvailablePrinters() = 0;
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698