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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/download_metadata_manager.cc

Issue 2733343002: Move chrome/common/safe_browsing/csd.proto to components/safe_browsing (Closed)
Patch Set: rebase again Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/safe_browsing/incident_reporting/download_metadata_mana ger.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/download_metadata_mana ger.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/files/file.h" 15 #include "base/files/file.h"
16 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
17 #include "base/files/important_file_writer.h" 17 #include "base/files/important_file_writer.h"
18 #include "base/location.h" 18 #include "base/location.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/ptr_util.h" 20 #include "base/memory/ptr_util.h"
21 #include "base/metrics/histogram_macros.h" 21 #include "base/metrics/histogram_macros.h"
22 #include "base/sequenced_task_runner.h" 22 #include "base/sequenced_task_runner.h"
23 #include "base/threading/sequenced_worker_pool.h" 23 #include "base/threading/sequenced_worker_pool.h"
24 #include "chrome/common/safe_browsing/csd.pb.h" 24 #include "components/safe_browsing/csd.pb.h"
25 #include "content/public/browser/browser_context.h" 25 #include "content/public/browser/browser_context.h"
26 #include "content/public/browser/download_item.h" 26 #include "content/public/browser/download_item.h"
27 27
28 namespace safe_browsing { 28 namespace safe_browsing {
29 29
30 namespace { 30 namespace {
31 31
32 // Histogram bucket values for metadata read operations. Do not reorder. 32 // Histogram bucket values for metadata read operations. Do not reorder.
33 enum MetadataReadResult { 33 enum MetadataReadResult {
34 READ_SUCCESS = 0, 34 READ_SUCCESS = 0,
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 } 656 }
657 657
658 void DownloadMetadataManager::ManagerContext::UpdateLastOpenedTime( 658 void DownloadMetadataManager::ManagerContext::UpdateLastOpenedTime(
659 const base::Time& last_opened_time) { 659 const base::Time& last_opened_time) {
660 download_metadata_->mutable_download()->set_open_time_msec( 660 download_metadata_->mutable_download()->set_open_time_msec(
661 last_opened_time.ToJavaTime()); 661 last_opened_time.ToJavaTime());
662 WriteMetadata(); 662 WriteMetadata();
663 } 663 }
664 664
665 } // namespace safe_browsing 665 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698