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

Side by Side Diff: chrome/browser/download/download_query.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/download/download_query.h" 5 #include "chrome/browser/download/download_query.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/files/file_path.h" 16 #include "base/files/file_path.h"
17 #include "base/i18n/case_conversion.h" 17 #include "base/i18n/case_conversion.h"
18 #include "base/i18n/string_search.h" 18 #include "base/i18n/string_search.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/memory/scoped_ptr.h" 20 #include "base/memory/scoped_ptr.h"
21 #include "base/prefs/pref_service.h"
22 #include "base/stl_util.h" 21 #include "base/stl_util.h"
23 #include "base/strings/string16.h" 22 #include "base/strings/string16.h"
24 #include "base/strings/string_split.h" 23 #include "base/strings/string_split.h"
25 #include "base/strings/stringprintf.h" 24 #include "base/strings/stringprintf.h"
26 #include "base/strings/utf_string_conversions.h" 25 #include "base/strings/utf_string_conversions.h"
27 #include "base/time/time.h" 26 #include "base/time/time.h"
28 #include "base/values.h" 27 #include "base/values.h"
29 #include "chrome/browser/profiles/profile.h" 28 #include "chrome/browser/profiles/profile.h"
30 #include "chrome/common/pref_names.h" 29 #include "chrome/common/pref_names.h"
30 #include "components/prefs/pref_service.h"
31 #include "components/url_formatter/url_formatter.h" 31 #include "components/url_formatter/url_formatter.h"
32 #include "content/public/browser/content_browser_client.h" 32 #include "content/public/browser/content_browser_client.h"
33 #include "content/public/browser/download_item.h" 33 #include "content/public/browser/download_item.h"
34 #include "third_party/re2/src/re2/re2.h" 34 #include "third_party/re2/src/re2/re2.h"
35 #include "url/gurl.h" 35 #include "url/gurl.h"
36 36
37 using content::DownloadDangerType; 37 using content::DownloadDangerType;
38 using content::DownloadItem; 38 using content::DownloadItem;
39 39
40 namespace { 40 namespace {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 if (!sorters_.empty()) { 437 if (!sorters_.empty()) {
438 std::partial_sort(results->begin(), 438 std::partial_sort(results->begin(),
439 results->begin() + std::min(limit_, results->size()), 439 results->begin() + std::min(limit_, results->size()),
440 results->end(), 440 results->end(),
441 DownloadComparator(sorters_)); 441 DownloadComparator(sorters_));
442 } 442 }
443 443
444 if (results->size() > limit_) 444 if (results->size() > limit_)
445 results->resize(limit_); 445 results->resize(limit_);
446 } 446 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_prefs_unittest.cc ('k') | chrome/browser/download/download_target_determiner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698