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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
33 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
34 #include "chrome/grit/generated_resources.h" | 34 #include "chrome/grit/generated_resources.h" |
35 #include "chrome/grit/theme_resources.h" | 35 #include "chrome/grit/theme_resources.h" |
36 #include "components/prefs/pref_service.h" | 36 #include "components/prefs/pref_service.h" |
37 #include "components/signin/core/browser/signin_manager_base.h" | 37 #include "components/signin/core/browser/signin_manager_base.h" |
38 #include "content/public/browser/browser_context.h" | 38 #include "content/public/browser/browser_context.h" |
39 #include "content/public/browser/navigation_controller.h" | 39 #include "content/public/browser/navigation_controller.h" |
40 #include "content/public/browser/storage_partition.h" | 40 #include "content/public/browser/storage_partition.h" |
41 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
| 42 #include "net/net_features.h" |
42 #include "ui/base/l10n/l10n_util.h" | 43 #include "ui/base/l10n/l10n_util.h" |
43 #include "ui/base/page_transition_types.h" | 44 #include "ui/base/page_transition_types.h" |
44 #include "ui/base/resource/resource_bundle.h" | 45 #include "ui/base/resource/resource_bundle.h" |
45 #include "ui/message_center/notifier_settings.h" | 46 #include "ui/message_center/notifier_settings.h" |
46 | 47 |
47 #if defined(ENABLE_MDNS) | 48 #if BUILDFLAG(ENABLE_MDNS) |
48 #include "chrome/browser/printing/cloud_print/privet_traffic_detector.h" | 49 #include "chrome/browser/printing/cloud_print/privet_traffic_detector.h" |
49 #endif | 50 #endif |
50 | 51 |
51 namespace cloud_print { | 52 namespace cloud_print { |
52 | 53 |
53 namespace { | 54 namespace { |
54 | 55 |
55 const int kTenMinutesInSeconds = 600; | 56 const int kTenMinutesInSeconds = 600; |
56 const char kPrivetInfoKeyUptime[] = "uptime"; | 57 const char kPrivetInfoKeyUptime[] = "uptime"; |
57 const char kPrivetNotificationID[] = "privet_notification"; | 58 const char kPrivetNotificationID[] = "privet_notification"; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 profile_->GetPrefs()->SetBoolean(prefs::kLocalDiscoveryNotificationsEnabled, | 388 profile_->GetPrefs()->SetBoolean(prefs::kLocalDiscoveryNotificationsEnabled, |
388 false); | 389 false); |
389 } | 390 } |
390 | 391 |
391 void PrivetNotificationDelegate::CloseNotification() { | 392 void PrivetNotificationDelegate::CloseNotification() { |
392 g_browser_process->notification_ui_manager()->CancelById( | 393 g_browser_process->notification_ui_manager()->CancelById( |
393 id(), NotificationUIManager::GetProfileID(profile_)); | 394 id(), NotificationUIManager::GetProfileID(profile_)); |
394 } | 395 } |
395 | 396 |
396 } // namespace cloud_print | 397 } // namespace cloud_print |
OLD | NEW |