[M120 Migration]Fix for crash during chrome exit
[platform/framework/web/chromium-efl.git] / chrome / browser / file_select_helper_contacts_android.h
1 // Copyright 2018 The Chromium Authors
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_FILE_SELECT_HELPER_CONTACTS_ANDROID_H_
6 #define CHROME_BROWSER_FILE_SELECT_HELPER_CONTACTS_ANDROID_H_
7
8 #include "chrome/browser/file_select_helper.h"
9
10 class FileSelectHelperContactsAndroid : public FileSelectHelper {
11  public:
12   FileSelectHelperContactsAndroid(const FileSelectHelperContactsAndroid&) =
13       delete;
14   FileSelectHelperContactsAndroid& operator=(
15       const FileSelectHelperContactsAndroid&) = delete;
16
17   // A SelectFileDialog::Listener override. |file| and |index| are unused in
18   // this override, since the file contents are passed in as string to |params|.
19   void FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file,
20                                  int index,
21                                  void* params) override;
22
23  private:
24   friend class FileSelectHelper;
25
26   explicit FileSelectHelperContactsAndroid(Profile* profile);
27   ~FileSelectHelperContactsAndroid() override = default;
28
29   void ProcessContactsForAndroid(const std::string& contacts);
30   void ProcessContactsForAndroidOnUIThread(const base::FilePath& temp_file);
31 };
32
33 #endif  // CHROME_BROWSER_FILE_SELECT_HELPER_CONTACTS_ANDROID_H_