OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/printing/cloud_print/privet_notifications.h" | 5 #include "chrome/browser/printing/cloud_print/privet_notifications.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
13 #include "base/prefs/pref_service.h" | |
14 #include "base/rand_util.h" | 13 #include "base/rand_util.h" |
15 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
16 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
17 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
18 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/local_discovery/service_discovery_shared_client.h" | 18 #include "chrome/browser/local_discovery/service_discovery_shared_client.h" |
20 #include "chrome/browser/notifications/notification.h" | 19 #include "chrome/browser/notifications/notification.h" |
21 #include "chrome/browser/notifications/notification_ui_manager.h" | 20 #include "chrome/browser/notifications/notification_ui_manager.h" |
22 #include "chrome/browser/printing/cloud_print/privet_device_lister_impl.h" | 21 #include "chrome/browser/printing/cloud_print/privet_device_lister_impl.h" |
23 #include "chrome/browser/printing/cloud_print/privet_http_asynchronous_factory.h
" | 22 #include "chrome/browser/printing/cloud_print/privet_http_asynchronous_factory.h
" |
24 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/browser/signin/signin_manager_factory.h" | 24 #include "chrome/browser/signin/signin_manager_factory.h" |
26 #include "chrome/browser/ui/browser.h" | 25 #include "chrome/browser/ui/browser.h" |
27 #include "chrome/browser/ui/browser_finder.h" | 26 #include "chrome/browser/ui/browser_finder.h" |
28 #include "chrome/browser/ui/browser_navigator_params.h" | 27 #include "chrome/browser/ui/browser_navigator_params.h" |
29 #include "chrome/browser/ui/browser_window.h" | 28 #include "chrome/browser/ui/browser_window.h" |
30 #include "chrome/browser/ui/host_desktop.h" | 29 #include "chrome/browser/ui/host_desktop.h" |
31 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 30 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
32 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" | 31 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" |
33 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
34 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
35 #include "chrome/grit/generated_resources.h" | 34 #include "chrome/grit/generated_resources.h" |
| 35 #include "components/prefs/pref_service.h" |
36 #include "components/signin/core/browser/signin_manager_base.h" | 36 #include "components/signin/core/browser/signin_manager_base.h" |
37 #include "content/public/browser/browser_context.h" | 37 #include "content/public/browser/browser_context.h" |
38 #include "content/public/browser/navigation_controller.h" | 38 #include "content/public/browser/navigation_controller.h" |
39 #include "content/public/browser/web_contents.h" | 39 #include "content/public/browser/web_contents.h" |
40 #include "grit/theme_resources.h" | 40 #include "grit/theme_resources.h" |
41 #include "ui/base/l10n/l10n_util.h" | 41 #include "ui/base/l10n/l10n_util.h" |
42 #include "ui/base/page_transition_types.h" | 42 #include "ui/base/page_transition_types.h" |
43 #include "ui/base/resource/resource_bundle.h" | 43 #include "ui/base/resource/resource_bundle.h" |
44 #include "ui/message_center/notifier_settings.h" | 44 #include "ui/message_center/notifier_settings.h" |
45 | 45 |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 | 386 |
387 void PrivetNotificationDelegate::DisableNotifications() { | 387 void PrivetNotificationDelegate::DisableNotifications() { |
388 Profile* profile_obj = Profile::FromBrowserContext(profile_); | 388 Profile* profile_obj = Profile::FromBrowserContext(profile_); |
389 | 389 |
390 profile_obj->GetPrefs()->SetBoolean( | 390 profile_obj->GetPrefs()->SetBoolean( |
391 prefs::kLocalDiscoveryNotificationsEnabled, | 391 prefs::kLocalDiscoveryNotificationsEnabled, |
392 false); | 392 false); |
393 } | 393 } |
394 | 394 |
395 } // namespace cloud_print | 395 } // namespace cloud_print |
OLD | NEW |