Commit 08bf0deb authored by Mohamed Adel's avatar Mohamed Adel Committed by Commit Bot

Move NotificationImageRetainer

Moving it to where the bridges are stored as NotificationImageRetainer
will be used in the NPB Mac UNNotification, making it not unique to
windows builds only.

Bug: 1136930
Change-Id: I496f9295d18665a27d39f8d0aced293a1f076a74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2460903
Auto-Submit: Mohamed Adel <adelm@google.com>
Commit-Queue: Mohamed Adel <adelm@google.com>
Reviewed-by: default avatarRichard Knoll <knollr@chromium.org>
Reviewed-by: default avatarRayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#815684}
parent cb1a0b86
......@@ -4469,8 +4469,6 @@ static_library("browser") {
"net/net_error_diagnostics_dialog_win.cc",
"net/service_providers_win.cc",
"net/service_providers_win.h",
"notifications/win/notification_image_retainer.cc",
"notifications/win/notification_image_retainer.h",
"notifications/win/notification_template_builder.cc",
"notifications/win/notification_template_builder.h",
"obsolete_system/obsolete_system_win.cc",
......@@ -4863,6 +4861,8 @@ static_library("browser") {
if (is_win || is_mac) {
# Sources(generally "desktop OS importers") used only on Mac & Windows.
sources += [
"notifications/notification_image_retainer.cc",
"notifications/notification_image_retainer.h",
"recovery/recovery_install_global_error.cc",
"recovery/recovery_install_global_error.h",
"recovery/recovery_install_global_error_factory.cc",
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/notifications/win/notification_image_retainer.h"
#include "chrome/browser/notifications/notification_image_retainer.h"
#include <algorithm>
#include <set>
......
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_IMAGE_RETAINER_H_
#define CHROME_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_IMAGE_RETAINER_H_
#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_IMAGE_RETAINER_H_
#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_IMAGE_RETAINER_H_
#include <memory>
#include <utility>
......@@ -95,4 +95,4 @@ class NotificationImageRetainer {
base::WeakPtrFactory<NotificationImageRetainer> weak_ptr_factory_{this};
};
#endif // CHROME_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_IMAGE_RETAINER_H_
#endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_IMAGE_RETAINER_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/notifications/win/notification_image_retainer.h"
#include "chrome/browser/notifications/notification_image_retainer.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
......
......@@ -32,7 +32,7 @@
#include "chrome/browser/notifications/notification_common.h"
#include "chrome/browser/notifications/notification_display_service_impl.h"
#include "chrome/browser/notifications/notification_handler.h"
#include "chrome/browser/notifications/win/notification_image_retainer.h"
#include "chrome/browser/notifications/notification_image_retainer.h"
#include "chrome/browser/notifications/win/notification_metrics.h"
#include "chrome/browser/notifications/win/notification_template_builder.h"
#include "chrome/browser/notifications/win/notification_util.h"
......
......@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_NOTIFICATIONS_WIN_FAKE_NOTIFICATION_IMAGE_RETAINER_H_
#define CHROME_BROWSER_NOTIFICATIONS_WIN_FAKE_NOTIFICATION_IMAGE_RETAINER_H_
#include "chrome/browser/notifications/win/notification_image_retainer.h"
#include "chrome/browser/notifications/notification_image_retainer.h"
namespace gfx {
class Image;
......
......@@ -17,7 +17,7 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "chrome/browser/notifications/win/notification_image_retainer.h"
#include "chrome/browser/notifications/notification_image_retainer.h"
#include "chrome/browser/notifications/win/notification_launch_id.h"
#include "chrome/common/chrome_features.h"
#include "chrome/grit/chromium_strings.h"
......
......@@ -5786,6 +5786,10 @@ test("unit_tests") {
data_deps += [ "//chrome:packed_resources" ]
}
}
if (is_win || is_mac) {
sources +=
[ "../browser/notifications/notification_image_retainer_unittest.cc" ]
}
if (is_win || is_mac || is_chromeos) {
sources += [ "../browser/extensions/api/networking_private/networking_private_crypto_unittest.cc" ]
}
......@@ -5795,7 +5799,6 @@ test("unit_tests") {
}
if (is_win) {
sources += [
"../browser/notifications/win/notification_image_retainer_unittest.cc",
"../browser/notifications/win/notification_template_builder_unittest.cc",
"../browser/ui/views/uninstall_view_unittest.cc",
"../browser/webshare/win/fake_data_transfer_manager_interop_unittest.cc",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment