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

Side by Side Diff: chrome/browser/media_galleries/media_folder_finder.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/media_galleries/media_folder_finder.h" 5 #include "chrome/browser/media_galleries/media_folder_finder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #if defined(OS_MACOSX) 91 #if defined(OS_MACOSX)
92 // Scanning root is of little value. 92 // Scanning root is of little value.
93 return (path.value() == "/"); 93 return (path.value() == "/");
94 #elif defined(OS_CHROMEOS) 94 #elif defined(OS_CHROMEOS)
95 // Sanity check to make sure mount points are where they should be. 95 // Sanity check to make sure mount points are where they should be.
96 base::FilePath mount_point = 96 base::FilePath mount_point =
97 chromeos::CrosDisksClient::GetRemovableDiskMountPoint(); 97 chromeos::CrosDisksClient::GetRemovableDiskMountPoint();
98 return mount_point.IsParent(path); 98 return mount_point.IsParent(path);
99 #elif defined(OS_LINUX) 99 #elif defined(OS_LINUX)
100 // /media and /mnt are likely the only places with interesting mount points. 100 // /media and /mnt are likely the only places with interesting mount points.
101 if (base::StartsWithASCII(path.value(), "/media", true) || 101 if (base::StartsWith(path.value(), "/media", base::CompareCase::SENSITIVE) ||
102 base::StartsWithASCII(path.value(), "/mnt", true)) { 102 base::StartsWith(path.value(), "/mnt", base::CompareCase::SENSITIVE)) {
103 return false; 103 return false;
104 } 104 }
105 return true; 105 return true;
106 #elif defined(OS_WIN) 106 #elif defined(OS_WIN)
107 return false; 107 return false;
108 #else 108 #else
109 NOTIMPLEMENTED(); 109 NOTIMPLEMENTED();
110 return false; 110 return false;
111 #endif 111 #endif
112 } 112 }
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 435
436 if (!IsEmptyScanResult(reply.scan_result)) 436 if (!IsEmptyScanResult(reply.scan_result))
437 results_[path] = reply.scan_result; 437 results_[path] = reply.scan_result;
438 438
439 // Push new folders to the |folders_to_scan_| in reverse order. 439 // Push new folders to the |folders_to_scan_| in reverse order.
440 std::copy(reply.new_folders.rbegin(), reply.new_folders.rend(), 440 std::copy(reply.new_folders.rbegin(), reply.new_folders.rend(),
441 std::back_inserter(folders_to_scan_)); 441 std::back_inserter(folders_to_scan_));
442 442
443 ScanFolder(); 443 ScanFolder();
444 } 444 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698