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

Side by Side Diff: base/trace_event/memory_allocator_dump_guid.cc

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/trace_event/memory_allocator_dump_guid.h"
6
7 #include "base/format_macros.h"
8 #include "base/hash.h"
9 #include "base/strings/stringprintf.h"
10
11 namespace base {
12 namespace trace_event {
13
14 MemoryAllocatorDumpGuid::MemoryAllocatorDumpGuid(uint64 guid) : guid_(guid) {
15 }
16
17 MemoryAllocatorDumpGuid::MemoryAllocatorDumpGuid()
18 : MemoryAllocatorDumpGuid(0u) {
19 }
20
21 MemoryAllocatorDumpGuid::MemoryAllocatorDumpGuid(const std::string& guid_str)
22 : MemoryAllocatorDumpGuid(Hash(guid_str)) {
23 }
24
25 std::string MemoryAllocatorDumpGuid::ToString() const {
26 return StringPrintf("%" PRIx64, guid_);
27 }
28
29 } // namespace trace_event
30 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/memory_allocator_dump_guid.h ('k') | base/trace_event/memory_allocator_dump_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698