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

Unified Diff: chrome/browser/printing/print_preview_data_service.h

Issue 10873097: Merge 153342 - Print preview: Use an ID instead of memory pointer string in WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1229/src/
Patch Set: Created 8 years, 4 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 | chrome/browser/printing/print_preview_data_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_preview_data_service.h
===================================================================
--- chrome/browser/printing/print_preview_data_service.h (revision 153583)
+++ chrome/browser/printing/print_preview_data_service.h (working copy)
@@ -28,7 +28,7 @@
// |printing::COMPLETE_PREVIEW_DOCUMENT_INDEX| to represent complete preview
// data. Use |index| to retrieve a specific preview page data. |data| is set
// to NULL if the requested page is not yet available.
- void GetDataEntry(const std::string& preview_ui_addr_str, int index,
+ void GetDataEntry(int32 preview_ui_id, int index,
scoped_refptr<base::RefCountedBytes>* data);
// Set/Update the data entry in PrintPreviewDataStore. |index| is zero-based
@@ -36,22 +36,22 @@
// preview data. Use |index| to set/update a specific preview page data.
// NOTE: PrintPreviewDataStore owns the data. Do not refcount |data| before
// calling this function. It will be refcounted in PrintPreviewDataStore.
- void SetDataEntry(const std::string& preview_ui_addr_str, int index,
+ void SetDataEntry(int32 preview_ui_id, int index,
const base::RefCountedBytes* data);
// Remove the corresponding PrintPreviewUI entry from the map.
- void RemoveEntry(const std::string& preview_ui_addr_str);
+ void RemoveEntry(int32 preview_ui_id);
// Returns the available draft page count.
- int GetAvailableDraftPageCount(const std::string& preview_ui_addr_str);
+ int GetAvailableDraftPageCount(int32 preview_ui_id);
private:
friend struct DefaultSingletonTraits<PrintPreviewDataService>;
// 1:1 relationship between PrintPreviewUI and data store object.
- // Key: Print preview UI address string.
+ // Key: PrintPreviewUI ID.
// Value: Print preview data store object.
- typedef std::map<std::string, scoped_refptr<PrintPreviewDataStore> >
+ typedef std::map<int32, scoped_refptr<PrintPreviewDataStore> >
PreviewDataStoreMap;
PrintPreviewDataService();
« no previous file with comments | « no previous file | chrome/browser/printing/print_preview_data_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698