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

Side by Side Diff: chrome/browser/ui/webui/downloads_dom_handler.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/ui/webui/downloads_dom_handler.h" 5 #include "chrome/browser/ui/webui/downloads_dom_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/i18n/rtl.h" 14 #include "base/i18n/rtl.h"
15 #include "base/i18n/time_formatting.h" 15 #include "base/i18n/time_formatting.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/memory/singleton.h" 17 #include "base/memory/singleton.h"
18 #include "base/metrics/field_trial.h" 18 #include "base/metrics/field_trial.h"
19 #include "base/metrics/histogram.h" 19 #include "base/metrics/histogram.h"
20 #include "base/prefs/pref_service.h"
21 #include "base/strings/string_number_conversions.h" 20 #include "base/strings/string_number_conversions.h"
22 #include "base/strings/string_piece.h" 21 #include "base/strings/string_piece.h"
23 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
24 #include "base/supports_user_data.h" 23 #include "base/supports_user_data.h"
25 #include "base/threading/thread.h" 24 #include "base/threading/thread.h"
26 #include "base/value_conversions.h" 25 #include "base/value_conversions.h"
27 #include "base/values.h" 26 #include "base/values.h"
28 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
29 #include "chrome/browser/download/download_crx_util.h" 28 #include "chrome/browser/download/download_crx_util.h"
30 #include "chrome/browser/download/download_danger_prompt.h" 29 #include "chrome/browser/download/download_danger_prompt.h"
31 #include "chrome/browser/download/download_history.h" 30 #include "chrome/browser/download/download_history.h"
32 #include "chrome/browser/download/download_item_model.h" 31 #include "chrome/browser/download/download_item_model.h"
33 #include "chrome/browser/download/download_prefs.h" 32 #include "chrome/browser/download/download_prefs.h"
34 #include "chrome/browser/download/download_query.h" 33 #include "chrome/browser/download/download_query.h"
35 #include "chrome/browser/download/download_service.h" 34 #include "chrome/browser/download/download_service.h"
36 #include "chrome/browser/download/download_service_factory.h" 35 #include "chrome/browser/download/download_service_factory.h"
37 #include "chrome/browser/download/drag_download_item.h" 36 #include "chrome/browser/download/drag_download_item.h"
38 #include "chrome/browser/extensions/api/downloads/downloads_api.h" 37 #include "chrome/browser/extensions/api/downloads/downloads_api.h"
39 #include "chrome/browser/extensions/extension_service.h" 38 #include "chrome/browser/extensions/extension_service.h"
40 #include "chrome/browser/platform_util.h" 39 #include "chrome/browser/platform_util.h"
41 #include "chrome/browser/profiles/profile.h" 40 #include "chrome/browser/profiles/profile.h"
42 #include "chrome/browser/ui/webui/fileicon_source.h" 41 #include "chrome/browser/ui/webui/fileicon_source.h"
43 #include "chrome/common/chrome_switches.h" 42 #include "chrome/common/chrome_switches.h"
44 #include "chrome/common/pref_names.h" 43 #include "chrome/common/pref_names.h"
45 #include "chrome/common/url_constants.h" 44 #include "chrome/common/url_constants.h"
45 #include "components/prefs/pref_service.h"
46 #include "content/public/browser/browser_thread.h" 46 #include "content/public/browser/browser_thread.h"
47 #include "content/public/browser/download_item.h" 47 #include "content/public/browser/download_item.h"
48 #include "content/public/browser/url_data_source.h" 48 #include "content/public/browser/url_data_source.h"
49 #include "content/public/browser/user_metrics.h" 49 #include "content/public/browser/user_metrics.h"
50 #include "content/public/browser/web_contents.h" 50 #include "content/public/browser/web_contents.h"
51 #include "content/public/browser/web_ui.h" 51 #include "content/public/browser/web_ui.h"
52 #include "extensions/browser/extension_system.h" 52 #include "extensions/browser/extension_system.h"
53 #include "net/base/filename_util.h" 53 #include "net/base/filename_util.h"
54 #include "third_party/icu/source/i18n/unicode/datefmt.h" 54 #include "third_party/icu/source/i18n/unicode/datefmt.h"
55 #include "ui/base/l10n/time_format.h" 55 #include "ui/base/l10n/time_format.h"
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 return web_ui()->GetWebContents(); 713 return web_ui()->GetWebContents();
714 } 714 }
715 715
716 void DownloadsDOMHandler::CallUpdateAll(const base::ListValue& list) { 716 void DownloadsDOMHandler::CallUpdateAll(const base::ListValue& list) {
717 web_ui()->CallJavascriptFunction("downloads.Manager.updateAll", list); 717 web_ui()->CallJavascriptFunction("downloads.Manager.updateAll", list);
718 } 718 }
719 719
720 void DownloadsDOMHandler::CallUpdateItem(const base::DictionaryValue& item) { 720 void DownloadsDOMHandler::CallUpdateItem(const base::DictionaryValue& item) {
721 web_ui()->CallJavascriptFunction("downloads.Manager.updateItem", item); 721 web_ui()->CallJavascriptFunction("downloads.Manager.updateItem", item);
722 } 722 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/slow_ui.cc ('k') | chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698