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

Side by Side Diff: content/public/browser/resource_context.h

Issue 1987643002: Make default media device ID salts random by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix for compile error Created 4 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
« no previous file with comments | « content/browser/resource_context_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // 65 //
66 // TODO(joi): We don't think it should be unnecessary to use this 66 // TODO(joi): We don't think it should be unnecessary to use this
67 // after ResourceContext goes away. There is likely an underying bug 67 // after ResourceContext goes away. There is likely an underying bug
68 // in the lifetime of ProfileIOData vs. ResourceProcessHost, where 68 // in the lifetime of ProfileIOData vs. ResourceProcessHost, where
69 // sometimes ProfileIOData has gone away before RPH has finished 69 // sometimes ProfileIOData has gone away before RPH has finished
70 // being torn down (on the IO thread). The current interface that 70 // being torn down (on the IO thread). The current interface that
71 // allows using the salt object after ResourceContext has gone away 71 // allows using the salt object after ResourceContext has gone away
72 // was put in place to fix http://crbug.com/341211 but I intend to 72 // was put in place to fix http://crbug.com/341211 but I intend to
73 // try to figure out how the lifetime should be fixed properly. The 73 // try to figure out how the lifetime should be fixed properly. The
74 // original interface was just a method that returns a string. 74 // original interface was just a method that returns a string.
75 //
76 // TODO(perkj): Make this method pure virtual when crbug/315022 is
77 // fixed.
78 typedef base::Callback<std::string()> SaltCallback; 75 typedef base::Callback<std::string()> SaltCallback;
79 virtual SaltCallback GetMediaDeviceIDSalt(); 76 virtual SaltCallback GetMediaDeviceIDSalt();
77
78 // Utility function useful for implementations
79 static std::string CreateRandomMediaDeviceIDSalt();
jochen (gone - plz use gerrit) 2016/06/03 12:50:25 as jam@ pointed out, you don't need to expose this
Guido Urdaneta 2016/06/03 13:09:44 The MediaDeviceIDSalt class uses that method to ge
80
81 private:
82 const std::string media_device_id_salt_;
80 }; 83 };
81 84
82 } // namespace content 85 } // namespace content
83 86
84 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ 87 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/resource_context_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698