| 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 <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 14 #include "base/md5.h" | 14 #include "base/md5.h" |
| 15 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
| 16 #include "base/prefs/scoped_user_pref_update.h" | 16 #include "base/prefs/scoped_user_pref_update.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/value_conversions.h" | 18 #include "base/value_conversions.h" |
| 19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
| 20 #include "chrome/browser/download/download_prefs.h" | 20 #include "chrome/browser/download/download_prefs.h" |
| 21 #include "chrome/browser/platform_util.h" | 21 #include "chrome/browser/platform_util.h" |
| 22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
| 23 #include "chrome/browser/ui/chrome_select_file_policy.h" | 23 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 24 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
| 25 #include "chrome/grit/generated_resources.h" |
| 25 #include "content/public/browser/browser_context.h" | 26 #include "content/public/browser/browser_context.h" |
| 26 #include "content/public/browser/browser_thread.h" | 27 #include "content/public/browser/browser_thread.h" |
| 27 #include "content/public/browser/child_process_security_policy.h" | 28 #include "content/public/browser/child_process_security_policy.h" |
| 28 #include "content/public/browser/download_manager.h" | 29 #include "content/public/browser/download_manager.h" |
| 29 #include "content/public/browser/render_process_host.h" | 30 #include "content/public/browser/render_process_host.h" |
| 30 #include "content/public/browser/render_view_host.h" | 31 #include "content/public/browser/render_view_host.h" |
| 31 #include "content/public/browser/web_contents.h" | 32 #include "content/public/browser/web_contents.h" |
| 32 #include "content/public/common/content_client.h" | 33 #include "content/public/common/content_client.h" |
| 33 #include "content/public/common/url_constants.h" | 34 #include "content/public/common/url_constants.h" |
| 34 #include "grit/generated_resources.h" | |
| 35 #include "ui/base/l10n/l10n_util.h" | 35 #include "ui/base/l10n/l10n_util.h" |
| 36 #include "ui/shell_dialogs/select_file_dialog.h" | 36 #include "ui/shell_dialogs/select_file_dialog.h" |
| 37 #include "webkit/browser/fileapi/file_system_url.h" | 37 #include "webkit/browser/fileapi/file_system_url.h" |
| 38 #include "webkit/browser/fileapi/isolated_context.h" | 38 #include "webkit/browser/fileapi/isolated_context.h" |
| 39 #include "webkit/common/fileapi/file_system_util.h" | 39 #include "webkit/common/fileapi/file_system_util.h" |
| 40 | 40 |
| 41 using base::Bind; | 41 using base::Bind; |
| 42 using base::Callback; | 42 using base::Callback; |
| 43 using content::BrowserContext; | 43 using content::BrowserContext; |
| 44 using content::BrowserThread; | 44 using content::BrowserThread; |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 base::DictionaryValue* file_systems_paths_value = update.Get(); | 420 base::DictionaryValue* file_systems_paths_value = update.Get(); |
| 421 file_systems_paths_value->RemoveWithoutPathExpansion(file_system_path, NULL); | 421 file_systems_paths_value->RemoveWithoutPathExpansion(file_system_path, NULL); |
| 422 } | 422 } |
| 423 | 423 |
| 424 bool DevToolsFileHelper::IsFileSystemAdded( | 424 bool DevToolsFileHelper::IsFileSystemAdded( |
| 425 const std::string& file_system_path) { | 425 const std::string& file_system_path) { |
| 426 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 426 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 427 set<std::string> file_system_paths = GetAddedFileSystemPaths(profile_); | 427 set<std::string> file_system_paths = GetAddedFileSystemPaths(profile_); |
| 428 return file_system_paths.find(file_system_path) != file_system_paths.end(); | 428 return file_system_paths.find(file_system_path) != file_system_paths.end(); |
| 429 } | 429 } |
| OLD | NEW |