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

Side by Side Diff: chrome/browser/file_select_helper.cc

Issue 1096323003: Remove unused sorting options from DirectoryLister. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed nits Created 5 years, 8 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
« no previous file with comments | « no previous file | net/base/directory_lister.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/file_select_helper.h" 5 #include "chrome/browser/file_select_helper.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 void FileSelectHelper::FileSelectionCanceled(void* params) { 184 void FileSelectHelper::FileSelectionCanceled(void* params) {
185 NotifyRenderViewHostAndEnd(std::vector<ui::SelectedFileInfo>()); 185 NotifyRenderViewHostAndEnd(std::vector<ui::SelectedFileInfo>());
186 } 186 }
187 187
188 void FileSelectHelper::StartNewEnumeration(const base::FilePath& path, 188 void FileSelectHelper::StartNewEnumeration(const base::FilePath& path,
189 int request_id, 189 int request_id,
190 RenderViewHost* render_view_host) { 190 RenderViewHost* render_view_host) {
191 scoped_ptr<ActiveDirectoryEnumeration> entry(new ActiveDirectoryEnumeration); 191 scoped_ptr<ActiveDirectoryEnumeration> entry(new ActiveDirectoryEnumeration);
192 entry->rvh_ = render_view_host; 192 entry->rvh_ = render_view_host;
193 entry->delegate_.reset(new DirectoryListerDispatchDelegate(this, request_id)); 193 entry->delegate_.reset(new DirectoryListerDispatchDelegate(this, request_id));
194 entry->lister_.reset(new net::DirectoryLister(path, 194 entry->lister_.reset(new net::DirectoryLister(
195 true, 195 path, net::DirectoryLister::NO_SORT_RECURSIVE, entry->delegate_.get()));
196 net::DirectoryLister::NO_SORT,
197 entry->delegate_.get()));
198 if (!entry->lister_->Start()) { 196 if (!entry->lister_->Start()) {
199 if (request_id == kFileSelectEnumerationId) 197 if (request_id == kFileSelectEnumerationId)
200 FileSelectionCanceled(NULL); 198 FileSelectionCanceled(NULL);
201 else 199 else
202 render_view_host->DirectoryEnumerationFinished(request_id, 200 render_view_host->DirectoryEnumerationFinished(request_id,
203 entry->results_); 201 entry->results_);
204 } else { 202 } else {
205 directory_enumerations_[request_id] = entry.release(); 203 directory_enumerations_[request_id] = entry.release();
206 } 204 }
207 } 205 }
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // of an extension or a "/" in the case of a MIME type). 564 // of an extension or a "/" in the case of a MIME type).
567 std::string unused; 565 std::string unused;
568 if (accept_type.length() <= 1 || 566 if (accept_type.length() <= 1 ||
569 base::StringToLowerASCII(accept_type) != accept_type || 567 base::StringToLowerASCII(accept_type) != accept_type ||
570 base::TrimWhitespaceASCII(accept_type, base::TRIM_ALL, &unused) != 568 base::TrimWhitespaceASCII(accept_type, base::TRIM_ALL, &unused) !=
571 base::TRIM_NONE) { 569 base::TRIM_NONE) {
572 return false; 570 return false;
573 } 571 }
574 return true; 572 return true;
575 } 573 }
OLDNEW
« no previous file with comments | « no previous file | net/base/directory_lister.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698