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

Side by Side Diff: components/password_manager/core/browser/export/password_exporter.h

Issue 1193143003: Enable import/export of passwords into/from Password Manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed import-complete dialog. Created 4 years, 9 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
vabr (Chromium) 2016/03/10 10:53:32 2016
xunlu 2016/03/16 07:23:59 Done.
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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_EXPORT_PASSWORD_EXPORTER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_EXPORT_PASSWORD_EXPORTER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/callback_forward.h"
12 #include "base/files/file_path.h"
13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h"
16
17 namespace autofill {
18 struct PasswordForm;
19 }
20
21 namespace base {
22 class FilePath;
23 class TaskRunner;
24 }
25
26 namespace password_manager {
27
28 class PasswordExporter {
29 public:
30 // Exports |passwords| into a file at |path|, overwriting any existing file,
31 // and fires |completion| on the calling thread when ready. Blocking IO tasks
32 // will be posted to |blocking_task_runner|. The format of the export will be
33 // selected based on the file extension in |path|.
34 static void Export(const base::FilePath& path,
35 std::vector<scoped_ptr<autofill::PasswordForm>> passwords,
36 scoped_refptr<base::TaskRunner> blocking_task_runner,
37 const base::Closure& completion);
vabr (Chromium) 2016/03/10 10:53:32 Is |completion| used for anything right now? If no
xunlu 2016/03/16 07:23:59 I removed it
38
39 // Returns the file extensions corresponding to supported formats.
40 static std::vector<std::vector<base::FilePath::StringType>>
vabr (Chromium) 2016/03/10 10:53:32 Why is the type a vector of vectors? Could you eit
xunlu 2016/03/16 07:23:59 Comments updated.
41 GetSupportedFileExtensions();
42
43 private:
44 DISALLOW_IMPLICIT_CONSTRUCTORS(PasswordExporter);
45 };
46
47 } // namespace password_manager
48
49 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_EXPORT_PASSWORD_EXPORTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698