OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/devtools/devtools_file_helper.h" | 5 #include "chrome/browser/devtools/devtools_file_helper.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 void Show(ui::SelectFileDialog::Type type, | 72 void Show(ui::SelectFileDialog::Type type, |
73 const base::FilePath& default_path) { | 73 const base::FilePath& default_path) { |
74 AddRef(); // Balanced in the three listener outcomes. | 74 AddRef(); // Balanced in the three listener outcomes. |
75 select_file_dialog_->SelectFile(type, | 75 select_file_dialog_->SelectFile(type, |
76 string16(), | 76 string16(), |
77 default_path, | 77 default_path, |
78 NULL, | 78 NULL, |
79 0, | 79 0, |
80 FILE_PATH_LITERAL(std::string()), | 80 base::FilePath::StringType(), |
81 NULL, | 81 NULL, |
82 NULL); | 82 NULL); |
83 } | 83 } |
84 | 84 |
85 // ui::SelectFileDialog::Listener implementation. | 85 // ui::SelectFileDialog::Listener implementation. |
86 virtual void FileSelected(const base::FilePath& path, | 86 virtual void FileSelected(const base::FilePath& path, |
87 int index, | 87 int index, |
88 void* params) OVERRIDE { | 88 void* params) OVERRIDE { |
89 selected_callback_.Run(path); | 89 selected_callback_.Run(path); |
90 Release(); // Balanced in ::Show. | 90 Release(); // Balanced in ::Show. |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 void DevToolsFileHelper::RemoveFileSystem(const std::string& file_system_path) { | 395 void DevToolsFileHelper::RemoveFileSystem(const std::string& file_system_path) { |
396 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 396 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
397 base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path); | 397 base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path); |
398 isolated_context()->RevokeFileSystemByPath(path); | 398 isolated_context()->RevokeFileSystemByPath(path); |
399 | 399 |
400 DictionaryPrefUpdate update(profile_->GetPrefs(), | 400 DictionaryPrefUpdate update(profile_->GetPrefs(), |
401 prefs::kDevToolsFileSystemPaths); | 401 prefs::kDevToolsFileSystemPaths); |
402 DictionaryValue* file_systems_paths_value = update.Get(); | 402 DictionaryValue* file_systems_paths_value = update.Get(); |
403 file_systems_paths_value->RemoveWithoutPathExpansion(file_system_path, NULL); | 403 file_systems_paths_value->RemoveWithoutPathExpansion(file_system_path, NULL); |
404 } | 404 } |
OLD | NEW |