Revert "Only store leading 13 bits of password hash."
[chromium-blink-merge.git] / chrome / common / extensions / api / webrtc_logging_private.idl
blob172035a5787723e71e90d99da183aef48dca2918
1 // Copyright 2013 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.
5 // Use the <code>chrome.webrtcLoggingPrivate</code> API to control diagnostic
6 // WebRTC logging.
7 namespace webrtcLoggingPrivate {
8 dictionary MetaDataEntry {
9 // The meta data entry key.
10 DOMString key;
12 // The meta data entry value.
13 DOMString value;
16 dictionary UploadResult {
17 // The report ID for the uploaded log. Will be empty if not successful.
18 DOMString reportId;
21 dictionary RequestInfo {
22 // The tab identifier from the chrome.tabs API, if the request is from a
23 // tab.
24 long? tabId;
26 // The guest process id for the requester, if the request is from a
27 // webview.
28 long? guestProcessId;
31 callback GenericDoneCallback = void ();
32 callback UploadDoneCallback = void (UploadResult result);
34 interface Functions {
35 // For all functions, |request| determines which render process to apply
36 // the operation on. |request| identifies the requesting process.
37 // |securityOrigin| is the security origin for the tab identified by |tabId|
38 // and is used for verifying that the tab is the correct one and has not
39 // been navigated away from.
41 // Sets additional custom meta data that will be uploaded along with the
42 // log. |metaData| is a dictionary of the metadata (key, value).
43 static void setMetaData(RequestInfo request,
44 DOMString securityOrigin,
45 MetaDataEntry[] metaData,
46 GenericDoneCallback callback);
48 // Starts logging. If logging has already been started for this render
49 // process, the call will be ignored. |appSessionId| is the unique session
50 // ID which will be added to the log.
51 static void start(RequestInfo request,
52 DOMString securityOrigin,
53 GenericDoneCallback callback);
55 // Sets whether the log should be uploaded automatically for the case when
56 // the render process goes away (tab is closed or crashes) and stop has not
57 // been called before that. If |shouldUpload| is true it will be uploaded,
58 // otherwise it will be discarded. The default setting is to discard it.
59 static void setUploadOnRenderClose(RequestInfo request,
60 DOMString securityOrigin,
61 boolean shouldUpload);
63 // Stops logging. After stop has finished, either upload() or discard()
64 // should be called, otherwise the log will be kept in memory until the
65 // render process is closed or logging restarted.
66 static void stop(RequestInfo request,
67 DOMString securityOrigin,
68 GenericDoneCallback callback);
70 // Uploads the log and the RTP dumps, if they exist. Logging and RTP dumping
71 // must be stopped before this function is called.
72 static void upload(RequestInfo request,
73 DOMString securityOrigin,
74 UploadDoneCallback callback);
76 // Discards the log. Logging must be stopped before this function is called.
77 static void discard(RequestInfo request,
78 DOMString securityOrigin,
79 GenericDoneCallback callback);
81 // Starts RTP dumping. If it has already been started for this render
82 // process, the call will be ignored.
83 static void startRtpDump(RequestInfo request,
84 DOMString securityOrigin,
85 boolean incoming,
86 boolean outgoing,
87 GenericDoneCallback callback);
89 // Stops RTP dumping. After stop has finished, the dumps will be
90 // uploaded with the log if upload is called. Otherwise, the dumps will be
91 // discarded.
92 static void stopRtpDump(RequestInfo request,
93 DOMString securityOrigin,
94 boolean incoming,
95 boolean outgoing,
96 GenericDoneCallback callback);