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

Unified Diff: chrome/browser/notifications/platform_notification_service_impl.cc

Issue 1657913003: Refactor of ProfileInfoCache in c/b/notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/platform_notification_service_impl.cc
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index 4edd70ba27455560e8dd8e587cb83eec00304c9f..a868392d23e41138e6fbcf8a338c4908b95a5db2 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/notifications/platform_notification_service_impl.h"
#include <utility>
+#include <vector>
#include "base/command_line.h"
#include "base/metrics/histogram_macros.h"
@@ -61,6 +62,8 @@ using content::BrowserThread;
using content::PlatformNotificationContext;
using message_center::NotifierId;
+class ProfileAttributesEntry;
+
namespace {
// Invalid id for a renderer process. Used in cases where we need to check for
@@ -159,11 +162,11 @@ void PlatformNotificationServiceImpl::ProcessPersistentNotificationOperation(
// if it already exist. We therefore check first that the profile is there
// and fail early otherwise.
const base::FilePath profile_path =
- profile_manager->GetProfileInfoCache().GetUserDataDir().AppendASCII(
- profile_id);
+ profile_manager->user_data_dir().AppendASCII(profile_id);
- if (profile_manager->GetProfileInfoCache().GetIndexOfProfileWithPath(
- profile_path) == std::string::npos) {
+ ProfileAttributesEntry* entry = nullptr;
+ if (!profile_manager->GetProfileAttributesStorage().
+ GetProfileAttributesWithPath(profile_path, &entry)) {
LOG(ERROR) << "Loading a path that does not exist";
return;
}

Powered by Google App Engine
This is Rietveld 408576698