Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: chrome/browser/ui/shell_dialogs_unittest.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/string16.h" 7 #include "base/string16.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/prefs/browser_prefs.h" 10 #include "chrome/browser/prefs/browser_prefs.h"
11 #include "chrome/browser/prefs/pref_service.h" 11 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/shell_dialogs.h" 13 #include "chrome/browser/ui/shell_dialogs.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "chrome/test/base/testing_browser_process.h" 15 #include "chrome/test/base/testing_browser_process.h"
16 #include "chrome/test/base/testing_pref_service.h" 16 #include "chrome/test/base/testing_pref_service.h"
17 #include "content/test/test_browser_thread.h" 17 #include "content/test/test_browser_thread.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 using content::BrowserThread;
21
20 class FileSelectionUser : public SelectFileDialog::Listener { 22 class FileSelectionUser : public SelectFileDialog::Listener {
21 public: 23 public:
22 FileSelectionUser() 24 FileSelectionUser()
23 : file_selection_initialisation_in_progress(false) { 25 : file_selection_initialisation_in_progress(false) {
24 } 26 }
25 27
26 ~FileSelectionUser() { 28 ~FileSelectionUser() {
27 if (select_file_dialog_.get()) 29 if (select_file_dialog_.get())
28 select_file_dialog_->ListenerDestroyed(); 30 select_file_dialog_->ListenerDestroyed();
29 } 31 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 83
82 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); 84 scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser());
83 85
84 // Disallow file-selection dialogs. 86 // Disallow file-selection dialogs.
85 local_state.Get()->SetManagedPref( 87 local_state.Get()->SetManagedPref(
86 prefs::kAllowFileSelectionDialogs, 88 prefs::kAllowFileSelectionDialogs,
87 Value::CreateBooleanValue(false)); 89 Value::CreateBooleanValue(false));
88 90
89 file_selection_user->StartFileSelection(); 91 file_selection_user->StartFileSelection();
90 } 92 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browsertest.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698