| 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_wapi_feed_loader.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
| 14 #include "base/threading/sequenced_worker_pool.h" | 14 #include "base/threading/sequenced_worker_pool.h" |
| 15 #include "base/values.h" |
| 15 #include "chrome/browser/chromeos/gdata/drive_webapps_registry.h" | 16 #include "chrome/browser/chromeos/gdata/drive_webapps_registry.h" |
| 16 #include "chrome/browser/chromeos/gdata/gdata_cache.h" | 17 #include "chrome/browser/chromeos/gdata/gdata_cache.h" |
| 17 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" | 18 #include "chrome/browser/chromeos/gdata/gdata_documents_service.h" |
| 18 #include "chrome/browser/chromeos/gdata/gdata_util.h" | 19 #include "chrome/browser/chromeos/gdata/gdata_util.h" |
| 19 #include "chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.h" | 20 #include "chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.h" |
| 20 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 21 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
| 22 | 23 |
| 23 using content::BrowserThread; | 24 using content::BrowserThread; |
| 24 | 25 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 129 } |
| 129 } | 130 } |
| 130 | 131 |
| 131 bool UseLevelDB() { | 132 bool UseLevelDB() { |
| 132 return CommandLine::ForCurrentProcess()->HasSwitch( | 133 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 133 switches::kUseLevelDBForGData); | 134 switches::kUseLevelDBForGData); |
| 134 } | 135 } |
| 135 | 136 |
| 136 } // namespace | 137 } // namespace |
| 137 | 138 |
| 139 LoadRootFeedParams::LoadRootFeedParams( |
| 140 FilePath search_file_path, |
| 141 bool should_load_from_server, |
| 142 const FindEntryCallback& callback) |
| 143 : search_file_path(search_file_path), |
| 144 should_load_from_server(should_load_from_server), |
| 145 load_error(GDATA_FILE_OK), |
| 146 load_start_time(base::Time::Now()), |
| 147 callback(callback) { |
| 148 } |
| 149 |
| 150 LoadRootFeedParams::~LoadRootFeedParams() { |
| 151 } |
| 152 |
| 138 GetDocumentsParams::GetDocumentsParams( | 153 GetDocumentsParams::GetDocumentsParams( |
| 139 int start_changestamp, | 154 int start_changestamp, |
| 140 int root_feed_changestamp, | 155 int root_feed_changestamp, |
| 141 std::vector<DocumentFeed*>* feed_list, | 156 std::vector<DocumentFeed*>* feed_list, |
| 142 bool should_fetch_multiple_feeds, | 157 bool should_fetch_multiple_feeds, |
| 143 const FilePath& search_file_path, | 158 const FilePath& search_file_path, |
| 144 const std::string& search_query, | 159 const std::string& search_query, |
| 145 const std::string& directory_resource_id, | 160 const std::string& directory_resource_id, |
| 146 const FindEntryCallback& callback, | 161 const FindEntryCallback& callback, |
| 147 GetDocumentsUiState* ui_state) | 162 GetDocumentsUiState* ui_state) |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 dir_iter != changed_dirs.end(); ++dir_iter) { | 723 dir_iter != changed_dirs.end(); ++dir_iter) { |
| 709 FOR_EACH_OBSERVER(Observer, observers_, | 724 FOR_EACH_OBSERVER(Observer, observers_, |
| 710 OnDirectoryChanged(*dir_iter)); | 725 OnDirectoryChanged(*dir_iter)); |
| 711 } | 726 } |
| 712 } | 727 } |
| 713 | 728 |
| 714 return error; | 729 return error; |
| 715 } | 730 } |
| 716 | 731 |
| 717 } // namespace gdata | 732 } // namespace gdata |
| OLD | NEW |