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

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

Issue 2119283002: Use container::back() and container::pop_back() for content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/base64.h" 9 #include "base/base64.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 stream << kNonPersistentPrefix; 99 stream << kNonPersistentPrefix;
100 stream << ComputeBrowserContextHash(browser_context_); 100 stream << ComputeBrowserContextHash(browser_context_);
101 stream << base::IntToString(browser_context_->IsOffTheRecord()); 101 stream << base::IntToString(browser_context_->IsOffTheRecord());
102 stream << origin; 102 stream << origin;
103 103
104 // Non-persistent notification ids are unique per renderer process when no 104 // Non-persistent notification ids are unique per renderer process when no
105 // tag is being used. Tags still identify uniqueness for the given origin. 105 // tag is being used. Tags still identify uniqueness for the given origin.
106 106
107 stream << base::IntToString(!tag.empty()); 107 stream << base::IntToString(!tag.empty());
108 if (!tag.size()) { 108 if (tag.empty()) {
109 stream << base::IntToString(render_process_id_); 109 stream << base::IntToString(render_process_id_);
110 stream << kSeparator; 110 stream << kSeparator;
111 111
112 stream << base::IntToString(non_persistent_notification_id); 112 stream << base::IntToString(non_persistent_notification_id);
113 } else { 113 } else {
114 stream << tag; 114 stream << tag;
115 } 115 }
116 116
117 return stream.str(); 117 return stream.str();
118 } 118 }
119 119
120 } // namespace content 120 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_value.cc ('k') | content/browser/notifications/platform_notification_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698