Index: content/browser/indexed_db/indexed_db_backing_store.cc |
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc |
index 86be4109745687b5c7027160ba5943f505dabf0b..fe068ab02fb0431b182612d2e93d150395fe5663 100644 |
--- a/content/browser/indexed_db/indexed_db_backing_store.cc |
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc |
@@ -40,6 +40,7 @@ |
#include "content/common/indexed_db/indexed_db_key_range.h" |
#include "content/public/browser/browser_thread.h" |
#include "net/base/load_flags.h" |
+#include "net/traffic_annotation/network_traffic_annotation.h" |
#include "net/url_request/url_request_context.h" |
#include "storage/browser/blob/blob_data_handle.h" |
#include "storage/browser/fileapi/file_stream_writer.h" |
@@ -2557,12 +2558,36 @@ class LocalWriteClosure : public FileWriterDelegate::DelegateWriteCallback, |
DCHECK(blob_url.is_valid()); |
net::URLRequestContext* request_context = |
request_context_getter->GetURLRequestContext(); |
+ net::NetworkTrafficAnnotationTag traffic_annotation = |
+ net::DefineNetworkTrafficAnnotation("persist_blob_to_indexed_db", R"( |
+ semantics { |
+ sender: "Indexed DB" |
+ description: |
+ "A web page's script has created a Blob (or File) object (either " |
+ "directly via constructors, or by using file upload to a form, or " |
+ "via a fetch()). The script has then made a request to store data " |
+ "including the Blob via the Indexed DB API. As part of committing " |
+ "the database transaction, the content of the Blob is being copied " |
+ "into a file in the database's directory." |
+ trigger: |
+ "The script has made a request to store data including a Blob via " |
+ "the Indexed DB API." |
+ data: |
+ "A Blob or File object referenced by script, either created " |
+ "directly via constructors, or by using file upload to a form, or " |
+ "drag/drop, or via a fetch() or other APIs that produce Blobs." |
+ destination: LOCAL |
+ } |
+ policy { |
+ cookies_allowed: false |
+ setting: "This feature cannot be disabled by settings." |
+ policy_exception_justification: "Not implemented." |
+ })"); |
std::unique_ptr<net::URLRequest> blob_request( |
request_context->CreateRequest(blob_url, net::DEFAULT_PRIORITY, |
- delegate.get())); |
+ delegate.get(), traffic_annotation)); |
blob_request->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES | |
net::LOAD_DO_NOT_SEND_COOKIES); |
- |
this->file_path_ = file_path; |
this->last_modified_ = last_modified; |