OLD | NEW |
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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // being torn down (on the IO thread). The current interface that | 84 // being torn down (on the IO thread). The current interface that |
85 // allows using the salt object after ResourceContext has gone away | 85 // allows using the salt object after ResourceContext has gone away |
86 // was put in place to fix http://crbug.com/341211 but I intend to | 86 // was put in place to fix http://crbug.com/341211 but I intend to |
87 // try to figure out how the lifetime should be fixed properly. The | 87 // try to figure out how the lifetime should be fixed properly. The |
88 // original interface was just a method that returns a string. | 88 // original interface was just a method that returns a string. |
89 // | 89 // |
90 // TODO(perkj): Make this method pure virtual when crbug/315022 is | 90 // TODO(perkj): Make this method pure virtual when crbug/315022 is |
91 // fixed. | 91 // fixed. |
92 typedef base::Callback<std::string()> SaltCallback; | 92 typedef base::Callback<std::string()> SaltCallback; |
93 virtual SaltCallback GetMediaDeviceIDSalt(); | 93 virtual SaltCallback GetMediaDeviceIDSalt(); |
| 94 |
| 95 // Enables / disables network outage emulation. |
| 96 // |client_id| should be DevToolsAgentHost GUID. |
| 97 virtual void SetNetworkState( |
| 98 const std::string& client_id, |
| 99 bool offline) = 0; |
94 }; | 100 }; |
95 | 101 |
96 } // namespace content | 102 } // namespace content |
97 | 103 |
98 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ | 104 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_CONTEXT_H_ |
OLD | NEW |