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

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

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 <stdint.h>
8
7 #include <string> 9 #include <string>
8 10
9 #include "base/bind.h" 11 #include "base/bind.h"
10 #include "base/callback.h" 12 #include "base/callback.h"
11 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
13 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
15 #include "base/thread_task_runner_handle.h" 17 #include "base/thread_task_runner_handle.h"
16 #include "chrome/common/safe_browsing/csd.pb.h" 18 #include "chrome/common/safe_browsing/csd.pb.h"
(...skipping 18 matching lines...) Expand all
35 using ::testing::StrEq; 37 using ::testing::StrEq;
36 using ::testing::_; 38 using ::testing::_;
37 39
38 namespace safe_browsing { 40 namespace safe_browsing {
39 41
40 namespace { 42 namespace {
41 43
42 const uint32_t kTestDownloadId = 47; 44 const uint32_t kTestDownloadId = 47;
43 const uint32_t kOtherDownloadId = 48; 45 const uint32_t kOtherDownloadId = 48;
44 const uint32_t kCrazyDowloadId = 655; 46 const uint32_t kCrazyDowloadId = 655;
45 const int64 kTestDownloadTimeMsec = 84; 47 const int64_t kTestDownloadTimeMsec = 84;
46 const char kTestUrl[] = "http://test.test/foo"; 48 const char kTestUrl[] = "http://test.test/foo";
47 const uint64_t kTestDownloadLength = 1000; 49 const uint64_t kTestDownloadLength = 1000;
48 const double kTestDownloadEndTimeMs = 1413514824057; 50 const double kTestDownloadEndTimeMs = 1413514824057;
49 51
50 // A utility class suitable for mocking that exposes a 52 // A utility class suitable for mocking that exposes a
51 // GetDownloadDetailsCallback. 53 // GetDownloadDetailsCallback.
52 class DownloadDetailsGetter { 54 class DownloadDetailsGetter {
53 public: 55 public:
54 virtual ~DownloadDetailsGetter() {} 56 virtual ~DownloadDetailsGetter() {}
55 virtual void OnDownloadDetails( 57 virtual void OnDownloadDetails(
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 // Allow everything to load into steady-state. 609 // Allow everything to load into steady-state.
608 RunAllTasks(); 610 RunAllTasks();
609 611
610 // Open the zero-id item. 612 // Open the zero-id item.
611 zero_item_->NotifyObserversDownloadOpened(); 613 zero_item_->NotifyObserversDownloadOpened();
612 614
613 ShutdownDownloadManager(); 615 ShutdownDownloadManager();
614 } 616 }
615 617
616 } // namespace safe_browsing 618 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698