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

Side by Side Diff: chrome/browser/extensions/app_data_migrator.h

Issue 671873004: Migrates legacy packaged app data when it's upgraded to a platform app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: trybot complaints Created 5 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 unified diff | Download patch
« no previous file with comments | « AUTHORS ('k') | chrome/browser/extensions/app_data_migrator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_DATA_MIGRATOR_H_
6 #define CHROME_BROWSER_EXTENSIONS_APP_DATA_MIGRATOR_H_
7
8 #include "base/callback_forward.h"
9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h"
11
12 class Profile;
13
14 namespace extensions {
15 class Extension;
16 class ExtensionRegistry;
17
18 // This class migrates legacy packaged app data in the general storage
19 // partition to an isolated storage partition. This happens when a legacy
20 // packaged app is upgraded to a platform app. See http://crbug.com/302577
21 class AppDataMigrator {
22 public:
23 AppDataMigrator(Profile* profile, ExtensionRegistry* registry);
24 ~AppDataMigrator();
25
26 static bool NeedsMigration(const Extension* old, const Extension* extension);
27
28 void DoMigrationAndReply(const Extension* old,
29 const Extension* extension,
30 const base::Closure& reply);
31
32 private:
33 Profile* profile_;
34 ExtensionRegistry* registry_;
35 base::WeakPtrFactory<AppDataMigrator> weak_factory_;
36
37 DISALLOW_COPY_AND_ASSIGN(AppDataMigrator);
38 };
39
40 } // namespace extensions
41
42 #endif // CHROME_BROWSER_EXTENSIONS_APP_DATA_MIGRATOR_H_
OLDNEW
« no previous file with comments | « AUTHORS ('k') | chrome/browser/extensions/app_data_migrator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698