OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/drive/file_system_core_util.h" | 5 #include "chrome/browser/chromeos/drive/file_system_core_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/i18n/icu_string_conversions.h" | 15 #include "base/i18n/icu_string_conversions.h" |
16 #include "base/json/json_file_value_serializer.h" | 16 #include "base/json/json_file_value_serializer.h" |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/prefs/pref_service.h" | 19 #include "base/prefs/pref_service.h" |
20 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
21 #include "base/strings/string_util.h" | 21 #include "base/strings/string_util.h" |
22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
23 #include "base/thread_task_runner_handle.h" | 23 #include "base/thread_task_runner_handle.h" |
24 #include "base/threading/sequenced_worker_pool.h" | 24 #include "base/threading/sequenced_worker_pool.h" |
25 #include "chrome/browser/chromeos/drive/drive_pref_names.h" | |
26 #include "chrome/browser/chromeos/drive/file_system_interface.h" | 25 #include "chrome/browser/chromeos/drive/file_system_interface.h" |
27 #include "chrome/browser/chromeos/drive/job_list.h" | 26 #include "chrome/browser/chromeos/drive/job_list.h" |
28 #include "chrome/browser/chromeos/drive/write_on_cache_file.h" | 27 #include "chrome/browser/chromeos/drive/write_on_cache_file.h" |
29 #include "components/drive/drive.pb.h" | 28 #include "components/drive/drive.pb.h" |
| 29 #include "components/drive/drive_pref_names.h" |
30 #include "net/base/escape.h" | 30 #include "net/base/escape.h" |
31 | 31 |
32 namespace drive { | 32 namespace drive { |
33 namespace util { | 33 namespace util { |
34 | 34 |
35 namespace { | 35 namespace { |
36 | 36 |
37 std::string ReadStringFromGDocFile(const base::FilePath& file_path, | 37 std::string ReadStringFromGDocFile(const base::FilePath& file_path, |
38 const std::string& key) { | 38 const std::string& key) { |
39 const int64 kMaxGDocSize = 4096; | 39 const int64 kMaxGDocSize = 4096; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 GURL ReadUrlFromGDocFile(const base::FilePath& file_path) { | 171 GURL ReadUrlFromGDocFile(const base::FilePath& file_path) { |
172 return GURL(ReadStringFromGDocFile(file_path, "url")); | 172 return GURL(ReadStringFromGDocFile(file_path, "url")); |
173 } | 173 } |
174 | 174 |
175 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path) { | 175 std::string ReadResourceIdFromGDocFile(const base::FilePath& file_path) { |
176 return ReadStringFromGDocFile(file_path, "resource_id"); | 176 return ReadStringFromGDocFile(file_path, "resource_id"); |
177 } | 177 } |
178 | 178 |
179 } // namespace util | 179 } // namespace util |
180 } // namespace drive | 180 } // namespace drive |
OLD | NEW |