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

Side by Side Diff: chrome/browser/profiles/profile_manager.h

Issue 7210006: AppCaches which belong to hosted apps are not protected from deletion (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Clearing appcaches & waiting in Shutdown(). Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This class keeps track of the currently-active profiles in the runtime. 5 // This class keeps track of the currently-active profiles in the runtime.
6 6
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Returns a ProfileInfoCache object which can be used to get information 151 // Returns a ProfileInfoCache object which can be used to get information
152 // about profiles without having to load them from disk. 152 // about profiles without having to load them from disk.
153 ProfileInfoCache& GetProfileInfoCache(); 153 ProfileInfoCache& GetProfileInfoCache();
154 154
155 // Schedules the profile at the given path to be deleted on shutdown. 155 // Schedules the profile at the given path to be deleted on shutdown.
156 void ScheduleProfileForDeletion(const FilePath& profile_dir); 156 void ScheduleProfileForDeletion(const FilePath& profile_dir);
157 157
158 // Checks if multiple profiles is enabled. 158 // Checks if multiple profiles is enabled.
159 static bool IsMultipleProfilesEnabled(); 159 static bool IsMultipleProfilesEnabled();
160 160
161 // Clears app caches related to all profiles and waits for the operation to
162 // complete.
163 void ClearAppCaches();
164
161 protected: 165 protected:
162 // Does final initial actions. 166 // Does final initial actions.
163 virtual void DoFinalInit(Profile* profile); 167 virtual void DoFinalInit(Profile* profile);
164 168
165 private: 169 private:
166 friend class ExtensionEventRouterForwarderTest; 170 friend class ExtensionEventRouterForwarderTest;
167 171
168 // This struct contains information about profiles which are being loaded or 172 // This struct contains information about profiles which are being loaded or
169 // were loaded. 173 // were loaded.
170 struct ProfileInfo { 174 struct ProfileInfo {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 }; 232 };
229 233
230 // Same as the ProfileManager, but doesn't initialize some services of the 234 // Same as the ProfileManager, but doesn't initialize some services of the
231 // profile. This one is useful in unittests. 235 // profile. This one is useful in unittests.
232 class ProfileManagerWithoutInit : public ProfileManager { 236 class ProfileManagerWithoutInit : public ProfileManager {
233 protected: 237 protected:
234 virtual void DoFinalInit(Profile*) {} 238 virtual void DoFinalInit(Profile*) {}
235 }; 239 };
236 240
237 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 241 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698