OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 "components/upload_list/upload_list.h" | 5 #include "components/upload_list/upload_list.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // UploadList::Delegate: | 50 // UploadList::Delegate: |
51 void OnUploadListAvailable() override { | 51 void OnUploadListAvailable() override { |
52 ASSERT_FALSE(quit_closure_.is_null()); | 52 ASSERT_FALSE(quit_closure_.is_null()); |
53 quit_closure_.Run(); | 53 quit_closure_.Run(); |
54 } | 54 } |
55 | 55 |
56 const scoped_refptr<base::SequencedWorkerPool> worker_pool() { | 56 const scoped_refptr<base::SequencedWorkerPool> worker_pool() { |
57 return worker_pool_owner_.pool(); | 57 return worker_pool_owner_.pool(); |
58 } | 58 } |
59 base::FilePath log_path() { | 59 base::FilePath log_path() { |
60 return temp_dir_.path().Append(FILE_PATH_LITERAL("uploads.log")); | 60 return temp_dir_.GetPath().Append(FILE_PATH_LITERAL("uploads.log")); |
61 } | 61 } |
62 | 62 |
63 private: | 63 private: |
64 base::MessageLoop message_loop_; | 64 base::MessageLoop message_loop_; |
65 base::ScopedTempDir temp_dir_; | 65 base::ScopedTempDir temp_dir_; |
66 base::SequencedWorkerPoolOwner worker_pool_owner_; | 66 base::SequencedWorkerPoolOwner worker_pool_owner_; |
67 base::Closure quit_closure_; | 67 base::Closure quit_closure_; |
68 }; | 68 }; |
69 | 69 |
70 // These tests test that UploadList can parse a vector of log entry strings of | 70 // These tests test that UploadList can parse a vector of log entry strings of |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 double time_double = uploads[0].upload_time.ToDoubleT(); | 318 double time_double = uploads[0].upload_time.ToDoubleT(); |
319 EXPECT_STREQ(kTestUploadTime, base::DoubleToString(time_double).c_str()); | 319 EXPECT_STREQ(kTestUploadTime, base::DoubleToString(time_double).c_str()); |
320 EXPECT_STREQ(kTestUploadId, uploads[0].upload_id.c_str()); | 320 EXPECT_STREQ(kTestUploadId, uploads[0].upload_id.c_str()); |
321 EXPECT_STREQ(kTestLocalID, uploads[0].local_id.c_str()); | 321 EXPECT_STREQ(kTestLocalID, uploads[0].local_id.c_str()); |
322 time_double = uploads[0].capture_time.ToDoubleT(); | 322 time_double = uploads[0].capture_time.ToDoubleT(); |
323 EXPECT_STREQ(kTestCaptureTime, base::DoubleToString(time_double).c_str()); | 323 EXPECT_STREQ(kTestCaptureTime, base::DoubleToString(time_double).c_str()); |
324 } | 324 } |
325 } | 325 } |
326 | 326 |
327 } // namespace | 327 } // namespace |
OLD | NEW |