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

Side by Side Diff: content/browser/notifications/notification_id_generator.cc

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/notifications/notification_id_generator.h" 5 #include "content/browser/notifications/notification_id_generator.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/sha1.h" 11 #include "base/sha1.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "build/build_config.h"
13 #include "content/public/browser/browser_context.h" 14 #include "content/public/browser/browser_context.h"
14 #include "url/gurl.h" 15 #include "url/gurl.h"
15 16
16 namespace content { 17 namespace content {
17 namespace { 18 namespace {
18 19
19 const char kSeparator = '#'; 20 const char kSeparator = '#';
20 21
21 // Computes a hash based on the path in which the |browser_context| is stored. 22 // Computes a hash based on the path in which the |browser_context| is stored.
22 // Since we only store the hash, SHA-1 is used to make the probability of 23 // Since we only store the hash, SHA-1 is used to make the probability of
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 90
90 stream << non_persistent_notification_id; 91 stream << non_persistent_notification_id;
91 } else { 92 } else {
92 stream << tag; 93 stream << tag;
93 } 94 }
94 95
95 return stream.str(); 96 return stream.str();
96 } 97 }
97 98
98 } // namespace content 99 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698