OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/gdata/gdata_directory_service.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_directory_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/sequenced_task_runner.h" | 12 #include "base/sequenced_task_runner.h" |
13 #include "base/string_number_conversions.h" | 13 #include "base/string_number_conversions.h" |
14 #include "base/threading/sequenced_worker_pool.h" | 14 #include "base/threading/sequenced_worker_pool.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "chrome/browser/chromeos/gdata/gdata.pb.h" | 16 #include "chrome/browser/chromeos/gdata/gdata.pb.h" |
17 #include "chrome/browser/chromeos/gdata/gdata_cache.h" | 17 #include "chrome/browser/chromeos/gdata/gdata_cache.h" |
18 #include "chrome/browser/chromeos/gdata/gdata_files.h" | |
19 #include "chrome/browser/chromeos/gdata/gdata_test_util.h" | 18 #include "chrome/browser/chromeos/gdata/gdata_test_util.h" |
20 #include "chrome/test/base/testing_profile.h" | 19 #include "chrome/test/base/testing_profile.h" |
21 #include "content/public/test/test_browser_thread.h" | 20 #include "content/public/test/test_browser_thread.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
23 | 22 |
24 namespace gdata { | 23 namespace gdata { |
25 namespace { | 24 namespace { |
26 | 25 |
27 // See gdata.proto for the difference between the two URLs. | 26 // See gdata.proto for the difference between the two URLs. |
28 const char kResumableEditMediaUrl[] = "http://resumable-edit-media/"; | 27 const char kResumableEditMediaUrl[] = "http://resumable-edit-media/"; |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 GDataDirectoryService directory_service2; | 620 GDataDirectoryService directory_service2; |
622 // InitFromDB should succeed with GDATA_FILE_OK as the db now exists. | 621 // InitFromDB should succeed with GDATA_FILE_OK as the db now exists. |
623 directory_service2.InitFromDB(db_path, blocking_task_runner, | 622 directory_service2.InitFromDB(db_path, blocking_task_runner, |
624 base::Bind(&InitFromDBCallback, GDATA_FILE_OK)); | 623 base::Bind(&InitFromDBCallback, GDATA_FILE_OK)); |
625 test_util::RunBlockingPoolTask(); | 624 test_util::RunBlockingPoolTask(); |
626 | 625 |
627 VerifyDirectoryService(&directory_service2); | 626 VerifyDirectoryService(&directory_service2); |
628 } | 627 } |
629 | 628 |
630 } // namespace gdata | 629 } // namespace gdata |
OLD | NEW |