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

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: Fix errors Created 4 years, 10 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 360840444c8aef59257ed9cbd9b0bffc65b70a6c..2cfe4332409908e78fb153d816b1893ccdede364 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -63,6 +63,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
@@ -163,11 +165,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