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

Unified Diff: content/browser/indexed_db/indexed_db_backing_store.cc

Issue 2860693002: Network traffic annotation added to indexed_db. (Closed)
Patch Set: Cookies disabled. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bf1e176a3768924d85060452fd9629962fa5b087 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/dop, or via a fetch() or other APIs that produce Blobs."
msramek 2017/05/09 11:54:09 typo: drop
Ramin Halavati 2017/05/09 11:57:15 Done.
+ destination: LOCAL
+ }
+ policy {
+ cookies_allowed: false
+ setting: "This feature cannot be stoped by settings."
msramek 2017/05/09 11:54:09 s/stoped/disabled/ ? (also, "stoped" seems to onl
Ramin Halavati 2017/05/09 11:57:15 Done.
+ 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698