OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/message_loop.h" |
7 #include "base/string16.h" | 8 #include "base/string16.h" |
8 #include "base/values.h" | 9 #include "base/values.h" |
9 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/prefs/browser_prefs.h" | 11 #include "chrome/browser/prefs/browser_prefs.h" |
11 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
12 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/shell_dialogs.h" | 14 #include "chrome/browser/ui/shell_dialogs.h" |
14 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
15 #include "chrome/test/base/testing_browser_process.h" | 16 #include "chrome/test/base/testing_browser_process.h" |
16 #include "chrome/test/base/testing_pref_service.h" | 17 #include "chrome/test/base/testing_pref_service.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 84 |
84 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); | 85 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); |
85 | 86 |
86 // Disallow file-selection dialogs. | 87 // Disallow file-selection dialogs. |
87 local_state.Get()->SetManagedPref( | 88 local_state.Get()->SetManagedPref( |
88 prefs::kAllowFileSelectionDialogs, | 89 prefs::kAllowFileSelectionDialogs, |
89 Value::CreateBooleanValue(false)); | 90 Value::CreateBooleanValue(false)); |
90 | 91 |
91 file_selection_user->StartFileSelection(); | 92 file_selection_user->StartFileSelection(); |
92 } | 93 } |
OLD | NEW |