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

Side by Side Diff: chrome/browser/ui/webui/feedback_ui.cc

Issue 10877006: Rename GDataErrorCode to DriveErrorCode, GDataFileError to DriveFileError (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor local variable name fix. Created 8 years, 3 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/ui/webui/feedback_ui.h" 5 #include "chrome/browser/ui/webui/feedback_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 bool ScreenshotGDataTimestampComp(const gdata::DriveEntryProto& entry1, 117 bool ScreenshotGDataTimestampComp(const gdata::DriveEntryProto& entry1,
118 const gdata::DriveEntryProto& entry2) { 118 const gdata::DriveEntryProto& entry2) {
119 return entry1.file_info().last_modified() > 119 return entry1.file_info().last_modified() >
120 entry2.file_info().last_modified(); 120 entry2.file_info().last_modified();
121 } 121 }
122 122
123 void ReadDirectoryCallback(size_t max_saved, 123 void ReadDirectoryCallback(size_t max_saved,
124 std::vector<std::string>* saved_screenshots, 124 std::vector<std::string>* saved_screenshots,
125 base::Closure callback, 125 base::Closure callback,
126 gdata::GDataFileError error, 126 gdata::DriveFileError error,
127 bool hide_hosted_documents, 127 bool hide_hosted_documents,
128 scoped_ptr<gdata::DriveEntryProtoVector> entries) { 128 scoped_ptr<gdata::DriveEntryProtoVector> entries) {
129 if (error != gdata::GDATA_FILE_OK) { 129 if (error != gdata::DRIVE_FILE_OK) {
130 callback.Run(); 130 callback.Run();
131 return; 131 return;
132 } 132 }
133 133
134 size_t max_scan = std::min(kMaxNumScanFiles, entries->size()); 134 size_t max_scan = std::min(kMaxNumScanFiles, entries->size());
135 std::vector<gdata::DriveEntryProto> screenshot_entries; 135 std::vector<gdata::DriveEntryProto> screenshot_entries;
136 for (size_t i = 0; i < max_scan; ++i) { 136 for (size_t i = 0; i < max_scan; ++i) {
137 const gdata::DriveEntryProto& entry = (*entries)[i]; 137 const gdata::DriveEntryProto& entry = (*entries)[i];
138 if (StartsWithASCII(entry.base_name(), kScreenshotPrefix, true) && 138 if (StartsWithASCII(entry.base_name(), kScreenshotPrefix, true) &&
139 EndsWith(entry.base_name(), kScreenshotSuffix, true)) { 139 EndsWith(entry.base_name(), kScreenshotSuffix, true)) {
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 size_t sort_size = std::min(max_saved, screenshot_filepaths.size()); 747 size_t sort_size = std::min(max_saved, screenshot_filepaths.size());
748 std::partial_sort(screenshot_filepaths.begin(), 748 std::partial_sort(screenshot_filepaths.begin(),
749 screenshot_filepaths.begin() + sort_size, 749 screenshot_filepaths.begin() + sort_size,
750 screenshot_filepaths.end(), 750 screenshot_filepaths.end(),
751 ScreenshotTimestampComp); 751 ScreenshotTimestampComp);
752 for (size_t i = 0; i < sort_size; ++i) 752 for (size_t i = 0; i < sort_size; ++i)
753 saved_screenshots->push_back(std::string(kSavedScreenshotsUrl) + 753 saved_screenshots->push_back(std::string(kSavedScreenshotsUrl) +
754 screenshot_filepaths[i]); 754 screenshot_filepaths[i]);
755 } 755 }
756 #endif 756 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/drive_internals_ui.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698