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" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "base/md5.h" | 13 #include "base/md5.h" |
| 14 #include "base/prefs/pref_service.h" |
14 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
15 #include "base/value_conversions.h" | 16 #include "base/value_conversions.h" |
16 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/download/download_prefs.h" | 18 #include "chrome/browser/download/download_prefs.h" |
18 #include "chrome/browser/prefs/pref_service.h" | |
19 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 19 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/ui/chrome_select_file_policy.h" | 21 #include "chrome/browser/ui/chrome_select_file_policy.h" |
22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
23 #include "content/public/browser/browser_context.h" | 23 #include "content/public/browser/browser_context.h" |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
25 #include "content/public/browser/child_process_security_policy.h" | 25 #include "content/public/browser/child_process_security_policy.h" |
26 #include "content/public/browser/download_manager.h" | 26 #include "content/public/browser/download_manager.h" |
27 #include "content/public/browser/render_process_host.h" | 27 #include "content/public/browser/render_process_host.h" |
28 #include "content/public/browser/render_view_host.h" | 28 #include "content/public/browser/render_view_host.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 void DevToolsFileHelper::RemoveFileSystem(const std::string& file_system_path) { | 394 void DevToolsFileHelper::RemoveFileSystem(const std::string& file_system_path) { |
395 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 395 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
396 base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path); | 396 base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path); |
397 isolated_context()->RevokeFileSystemByPath(path); | 397 isolated_context()->RevokeFileSystemByPath(path); |
398 | 398 |
399 DictionaryPrefUpdate update(profile_->GetPrefs(), | 399 DictionaryPrefUpdate update(profile_->GetPrefs(), |
400 prefs::kDevToolsFileSystemPaths); | 400 prefs::kDevToolsFileSystemPaths); |
401 DictionaryValue* file_systems_paths_value = update.Get(); | 401 DictionaryValue* file_systems_paths_value = update.Get(); |
402 file_systems_paths_value->RemoveWithoutPathExpansion(file_system_path, NULL); | 402 file_systems_paths_value->RemoveWithoutPathExpansion(file_system_path, NULL); |
403 } | 403 } |
OLD | NEW |