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

Side by Side Diff: chrome/browser/ntp_snippets/download_suggestions_provider.cc

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: rebase Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ntp_snippets/download_suggestions_provider.h" 5 #include "chrome/browser/ntp_snippets/download_suggestions_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/feature_list.h" 11 #include "base/feature_list.h"
12 #include "base/guid.h" 12 #include "base/guid.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "base/strings/utf_string_conversions.h" 17 #include "base/strings/utf_string_conversions.h"
18 #include "base/threading/thread_task_runner_handle.h" 18 #include "base/threading/thread_task_runner_handle.h"
19 #include "base/time/time.h" 19 #include "base/time/time.h"
20 #include "chrome/common/chrome_features.h" 20 #include "chrome/common/chrome_features.h"
21 #include "chrome/grit/generated_resources.h" 21 #include "chrome/grit/generated_resources.h"
22 #include "components/ntp_snippets/features.h" 22 #include "components/ntp_snippets/features.h"
23 #include "components/ntp_snippets/pref_names.h" 23 #include "components/ntp_snippets/pref_names.h"
24 #include "components/ntp_snippets/pref_util.h" 24 #include "components/ntp_snippets/pref_util.h"
25 #include "components/offline_pages/offline_page_model_query.h" 25 #include "components/offline_pages/core/offline_page_model_query.h"
26 #include "components/prefs/pref_registry_simple.h" 26 #include "components/prefs/pref_registry_simple.h"
27 #include "components/prefs/pref_service.h" 27 #include "components/prefs/pref_service.h"
28 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
29 #include "ui/gfx/image/image.h" 29 #include "ui/gfx/image/image.h"
30 30
31 using content::DownloadItem; 31 using content::DownloadItem;
32 using content::DownloadManager; 32 using content::DownloadManager;
33 using ntp_snippets::Category; 33 using ntp_snippets::Category;
34 using ntp_snippets::CategoryInfo; 34 using ntp_snippets::CategoryInfo;
35 using ntp_snippets::CategoryStatus; 35 using ntp_snippets::CategoryStatus;
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 void DownloadSuggestionsProvider::UnregisterDownloadItemObservers() { 745 void DownloadSuggestionsProvider::UnregisterDownloadItemObservers() {
746 DCHECK_NE(download_manager_, nullptr); 746 DCHECK_NE(download_manager_, nullptr);
747 747
748 std::vector<DownloadItem*> all_downloads; 748 std::vector<DownloadItem*> all_downloads;
749 download_manager_->GetAllDownloads(&all_downloads); 749 download_manager_->GetAllDownloads(&all_downloads);
750 750
751 for (DownloadItem* item : all_downloads) { 751 for (DownloadItem* item : all_downloads) {
752 item->RemoveObserver(this); 752 item->RemoveObserver(this);
753 } 753 }
754 } 754 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698