Chromium Code Reviews| 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_file_system.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_file_system.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 3065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3076 base::Bind(&OnCacheUpdatedForAddUploadedFile, | 3076 base::Bind(&OnCacheUpdatedForAddUploadedFile, |
| 3077 params->callback)); | 3077 params->callback)); |
| 3078 } else if (params->upload_mode == UPLOAD_EXISTING_FILE) { | 3078 } else if (params->upload_mode == UPLOAD_EXISTING_FILE) { |
| 3079 // Clear the dirty bit if we have updated an existing file. | 3079 // Clear the dirty bit if we have updated an existing file. |
| 3080 cache_->ClearDirtyOnUIThread(params->resource_id, | 3080 cache_->ClearDirtyOnUIThread(params->resource_id, |
| 3081 params->md5, | 3081 params->md5, |
| 3082 base::Bind(&OnCacheUpdatedForAddUploadedFile, | 3082 base::Bind(&OnCacheUpdatedForAddUploadedFile, |
| 3083 params->callback)); | 3083 params->callback)); |
| 3084 } else { | 3084 } else { |
| 3085 NOTREACHED() << "Unexpected upload mode: " << params->upload_mode; | 3085 NOTREACHED() << "Unexpected upload mode: " << params->upload_mode; |
| 3086 params->callback.Run(); | |
|
kochi
2012/08/15 07:34:44
What does it make sense for after NOTREACHED()?
If
kinaba
2012/08/15 07:52:42
Added comment. To be more safer, I'd like to stick
| |
| 3086 } | 3087 } |
| 3087 params->callback.Run(); | |
| 3088 } | 3088 } |
| 3089 | 3089 |
| 3090 void GDataFileSystem::Observe(int type, | 3090 void GDataFileSystem::Observe(int type, |
| 3091 const content::NotificationSource& source, | 3091 const content::NotificationSource& source, |
| 3092 const content::NotificationDetails& details) { | 3092 const content::NotificationDetails& details) { |
| 3093 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 3093 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 3094 | 3094 |
| 3095 if (type == chrome::NOTIFICATION_PREF_CHANGED) { | 3095 if (type == chrome::NOTIFICATION_PREF_CHANGED) { |
| 3096 PrefService* pref_service = profile_->GetPrefs(); | 3096 PrefService* pref_service = profile_->GetPrefs(); |
| 3097 std::string* pref_name = content::Details<std::string>(details).ptr(); | 3097 std::string* pref_name = content::Details<std::string>(details).ptr(); |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3451 return; | 3451 return; |
| 3452 } | 3452 } |
| 3453 | 3453 |
| 3454 PlatformFileInfoProto entry_file_info; | 3454 PlatformFileInfoProto entry_file_info; |
| 3455 GDataEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); | 3455 GDataEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); |
| 3456 *entry_proto->mutable_file_info() = entry_file_info; | 3456 *entry_proto->mutable_file_info() = entry_file_info; |
| 3457 callback.Run(GDATA_FILE_OK, entry_proto.Pass()); | 3457 callback.Run(GDATA_FILE_OK, entry_proto.Pass()); |
| 3458 } | 3458 } |
| 3459 | 3459 |
| 3460 } // namespace gdata | 3460 } // namespace gdata |
| OLD | NEW |