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/ui/chrome_select_file_policy.h" | 5 #include "chrome/browser/ui/chrome_select_file_policy.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/prefs/pref_service.h" |
10 #include "base/string16.h" | 11 #include "base/string16.h" |
11 #include "base/values.h" | 12 #include "base/values.h" |
12 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/prefs/browser_prefs.h" | 14 #include "chrome/browser/prefs/browser_prefs.h" |
14 #include "chrome/browser/prefs/pref_service.h" | |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
17 #include "chrome/test/base/testing_browser_process.h" | 17 #include "chrome/test/base/testing_browser_process.h" |
18 #include "chrome/test/base/testing_pref_service.h" | 18 #include "chrome/test/base/testing_pref_service.h" |
19 #include "content/public/test/test_browser_thread.h" | 19 #include "content/public/test/test_browser_thread.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 #include "ui/shell_dialogs/select_file_dialog.h" | 21 #include "ui/shell_dialogs/select_file_dialog.h" |
22 | 22 |
23 #if defined(USE_AURA) | 23 #if defined(USE_AURA) |
24 // http://crbug.com/105200 | 24 // http://crbug.com/105200 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 TestingBrowserProcess::GetGlobal()); | 96 TestingBrowserProcess::GetGlobal()); |
97 | 97 |
98 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); | 98 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); |
99 | 99 |
100 // Disallow file-selection dialogs. | 100 // Disallow file-selection dialogs. |
101 local_state.Get()->SetManagedPref(prefs::kAllowFileSelectionDialogs, | 101 local_state.Get()->SetManagedPref(prefs::kAllowFileSelectionDialogs, |
102 new base::FundamentalValue(false)); | 102 new base::FundamentalValue(false)); |
103 | 103 |
104 file_selection_user->StartFileSelection(); | 104 file_selection_user->StartFileSelection(); |
105 } | 105 } |
OLD | NEW |