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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_sync_client.cc

Issue 10855034: Drive: Remove gdata_params.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review (#16) fix & rebase Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
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_sync_client.h" 5 #include "chrome/browser/chromeos/gdata/gdata_sync_client.h"
6 6
7 #include <sys/types.h> 7 #include <sys/types.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 queue_.pop_front(); 178 queue_.pop_front();
179 if (sync_task.sync_type == FETCH) { 179 if (sync_task.sync_type == FETCH) {
180 DVLOG(1) << "Fetching " << sync_task.resource_id; 180 DVLOG(1) << "Fetching " << sync_task.resource_id;
181 file_system_->GetFileByResourceId( 181 file_system_->GetFileByResourceId(
182 sync_task.resource_id, 182 sync_task.resource_id,
183 base::Bind(&GDataSyncClient::OnFetchFileComplete, 183 base::Bind(&GDataSyncClient::OnFetchFileComplete,
184 weak_ptr_factory_.GetWeakPtr(), 184 weak_ptr_factory_.GetWeakPtr(),
185 sync_task), 185 sync_task),
186 GetDownloadDataCallback()); 186 GetContentCallback());
187 } else if (sync_task.sync_type == UPLOAD) { 187 } else if (sync_task.sync_type == UPLOAD) {
188 DVLOG(1) << "Uploading " << sync_task.resource_id; 188 DVLOG(1) << "Uploading " << sync_task.resource_id;
189 file_system_->UpdateFileByResourceId( 189 file_system_->UpdateFileByResourceId(
190 sync_task.resource_id, 190 sync_task.resource_id,
191 base::Bind(&GDataSyncClient::OnUploadFileComplete, 191 base::Bind(&GDataSyncClient::OnUploadFileComplete,
192 weak_ptr_factory_.GetWeakPtr(), 192 weak_ptr_factory_.GetWeakPtr(),
193 sync_task.resource_id)); 193 sync_task.resource_id));
194 } else { 194 } else {
195 NOTREACHED() << ": Unexpected sync type: " << sync_task.sync_type; 195 NOTREACHED() << ": Unexpected sync type: " << sync_task.sync_type;
196 } 196 }
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 const content::NotificationDetails& details) { 457 const content::NotificationDetails& details) {
458 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 458 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
459 459
460 // Resume the sync loop if gdata preferences are changed. Note that we 460 // Resume the sync loop if gdata preferences are changed. Note that we
461 // don't need to check the new values here as these will be checked in 461 // don't need to check the new values here as these will be checked in
462 // ShouldStopSyncLoop() as soon as the loop is resumed. 462 // ShouldStopSyncLoop() as soon as the loop is resumed.
463 StartSyncLoop(); 463 StartSyncLoop();
464 } 464 }
465 465
466 } // namespace gdata 466 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_protocol_handler.cc ('k') | chrome/browser/chromeos/gdata/gdata_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698