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

Unified Diff: cc/surfaces/local_frame_id.h

Issue 2521543003: Add stream operator for SurfaceId/FrameSinkId/LocalFrameId. (Closed)
Patch Set: Add another missing include. 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 | « cc/surfaces/frame_sink_id.cc ('k') | cc/surfaces/local_frame_id.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/local_frame_id.h
diff --git a/cc/surfaces/local_frame_id.h b/cc/surfaces/local_frame_id.h
index c3ac7822b799beabe209e42bdc1329cff3e045a3..ea0ec038dfc807e1871465122494879179322a11 100644
--- a/cc/surfaces/local_frame_id.h
+++ b/cc/surfaces/local_frame_id.h
@@ -6,10 +6,12 @@
#define CC_SURFACES_LOCAL_FRAME_ID_H_
#include <inttypes.h>
+
+#include <iosfwd>
+#include <string>
#include <tuple>
#include "base/hash.h"
-#include "base/strings/stringprintf.h"
#include "base/unguessable_token.h"
namespace cc {
@@ -48,16 +50,15 @@ class LocalFrameId {
local_id_, static_cast<uint64_t>(base::UnguessableTokenHash()(nonce_)));
}
- std::string ToString() const {
- return base::StringPrintf("LocalFrameId(%d, %s" PRIu64 ")", local_id_,
- nonce_.ToString().c_str());
- }
+ std::string ToString() const;
private:
uint32_t local_id_;
base::UnguessableToken nonce_;
};
+std::ostream& operator<<(std::ostream& out, const LocalFrameId& local_frame_id);
+
struct LocalFrameIdHash {
size_t operator()(const LocalFrameId& key) const { return key.hash(); }
};
« no previous file with comments | « cc/surfaces/frame_sink_id.cc ('k') | cc/surfaces/local_frame_id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698