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

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

Issue 1279123004: Replace ToLower calls to the new format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 CleanUpOnRenderViewHostChange(); 558 CleanUpOnRenderViewHostChange();
559 } 559 }
560 560
561 // static 561 // static
562 bool FileSelectHelper::IsAcceptTypeValid(const std::string& accept_type) { 562 bool FileSelectHelper::IsAcceptTypeValid(const std::string& accept_type) {
563 // TODO(raymes): This only does some basic checks, extend to test more cases. 563 // TODO(raymes): This only does some basic checks, extend to test more cases.
564 // A 1 character accept type will always be invalid (either a "." in the case 564 // A 1 character accept type will always be invalid (either a "." in the case
565 // of an extension or a "/" in the case of a MIME type). 565 // of an extension or a "/" in the case of a MIME type).
566 std::string unused; 566 std::string unused;
567 if (accept_type.length() <= 1 || 567 if (accept_type.length() <= 1 ||
568 base::StringToLowerASCII(accept_type) != accept_type || 568 base::ToLowerASCII(accept_type) != accept_type ||
569 base::TrimWhitespaceASCII(accept_type, base::TRIM_ALL, &unused) != 569 base::TrimWhitespaceASCII(accept_type, base::TRIM_ALL, &unused) !=
570 base::TRIM_NONE) { 570 base::TRIM_NONE) {
571 return false; 571 return false;
572 } 572 }
573 return true; 573 return true;
574 } 574 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/updater/local_extension_cache_unittest.cc ('k') | chrome/browser/icon_loader_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698