| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/md_history_ui.h" | 5 #include "chrome/browser/ui/webui/md_history_ui.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/signin/signin_manager_factory.h" | 14 #include "chrome/browser/signin/signin_manager_factory.h" |
| 15 #include "chrome/browser/ui/webui/browsing_history_handler.h" | 15 #include "chrome/browser/ui/webui/browsing_history_handler.h" |
| 16 #include "chrome/browser/ui/webui/foreign_session_handler.h" | 16 #include "chrome/browser/ui/webui/foreign_session_handler.h" |
| 17 #include "chrome/browser/ui/webui/history_login_handler.h" | 17 #include "chrome/browser/ui/webui/history_login_handler.h" |
| 18 #include "chrome/browser/ui/webui/metrics_handler.h" | 18 #include "chrome/browser/ui/webui/metrics_handler.h" |
| 19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 20 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
| 21 #include "chrome/grit/browser_resources.h" | 21 #include "chrome/grit/browser_resources.h" |
| 22 #include "chrome/grit/generated_resources.h" | 22 #include "chrome/grit/generated_resources.h" |
| 23 #include "chrome/grit/locale_settings.h" | 23 #include "chrome/grit/locale_settings.h" |
| 24 #include "chrome/grit/theme_resources.h" | |
| 25 #include "components/pref_registry/pref_registry_syncable.h" | 24 #include "components/pref_registry/pref_registry_syncable.h" |
| 26 #include "components/prefs/pref_service.h" | 25 #include "components/prefs/pref_service.h" |
| 27 #include "components/search/search.h" | 26 #include "components/search/search.h" |
| 28 #include "components/signin/core/browser/signin_manager.h" | 27 #include "components/signin/core/browser/signin_manager.h" |
| 29 #include "components/strings/grit/components_strings.h" | 28 #include "components/strings/grit/components_strings.h" |
| 30 #include "content/public/browser/web_ui.h" | 29 #include "content/public/browser/web_ui.h" |
| 31 #include "content/public/browser/web_ui_data_source.h" | 30 #include "content/public/browser/web_ui_data_source.h" |
| 32 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
| 33 | 32 |
| 34 namespace { | 33 namespace { |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 235 |
| 237 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryHost, | 236 content::WebUIDataSource::Update(profile, chrome::kChromeUIHistoryHost, |
| 238 std::move(update)); | 237 std::move(update)); |
| 239 } | 238 } |
| 240 | 239 |
| 241 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { | 240 void MdHistoryUI::HandleMenuPromoShown(const base::ListValue* args) { |
| 242 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( | 241 Profile::FromWebUI(web_ui())->GetPrefs()->SetBoolean( |
| 243 prefs::kMdHistoryMenuPromoShown, true); | 242 prefs::kMdHistoryMenuPromoShown, true); |
| 244 UpdateDataSource(); | 243 UpdateDataSource(); |
| 245 } | 244 } |
| OLD | NEW |