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

Side by Side Diff: chrome/browser/chromeos/usb_mount_observer.cc

Issue 5025001: Removed Labs section from Chrome OS settings page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed RegisterPref call Created 10 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
« no previous file with comments | « chrome/browser/chromeos/dom_ui/labs_handler.cc ('k') | chrome/browser/dom_ui/filebrowse_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/usb_mount_observer.h" 5 #include "chrome/browser/chromeos/usb_mount_observer.h"
6 6
7 #include "base/command_line.h"
7 #include "chrome/browser/browser.h" 8 #include "chrome/browser/browser.h"
8 #include "chrome/browser/browser_list.h" 9 #include "chrome/browser/browser_list.h"
9 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
10 #include "chrome/browser/dom_ui/filebrowse_ui.h" 11 #include "chrome/browser/dom_ui/filebrowse_ui.h"
11 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/profile.h" 12 #include "chrome/browser/profile.h"
13 #include "chrome/browser/tab_contents/tab_contents.h" 13 #include "chrome/browser/tab_contents/tab_contents.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/chrome_switches.h"
15 #include "chrome/common/url_constants.h" 15 #include "chrome/common/url_constants.h"
16 16
17 namespace chromeos { 17 namespace chromeos {
18 18
19 const char* kFilebrowseURLHash = "chrome://filebrowse#"; 19 const char* kFilebrowseURLHash = "chrome://filebrowse#";
20 const char* kFilebrowseScanning = "scanningdevice"; 20 const char* kFilebrowseScanning = "scanningdevice";
21 const int kPopupLeft = 0; 21 const int kPopupLeft = 0;
22 const int kPopupTop = 0; 22 const int kPopupTop = 0;
23 const int kPopupWidth = 250; 23 const int kPopupWidth = 250;
24 const int kPopupHeight = 300; 24 const int kPopupHeight = 300;
(...skipping 27 matching lines...) Expand all
52 void USBMountObserver::OpenFileBrowse(const std::string& url, 52 void USBMountObserver::OpenFileBrowse(const std::string& url,
53 const std::string& device_path, 53 const std::string& device_path,
54 bool small) { 54 bool small) {
55 Browser* browser; 55 Browser* browser;
56 Profile* profile; 56 Profile* profile;
57 browser = BrowserList::GetLastActive(); 57 browser = BrowserList::GetLastActive();
58 if (browser == NULL) { 58 if (browser == NULL) {
59 return; 59 return;
60 } 60 }
61 profile = browser->profile(); 61 profile = browser->profile();
62 PrefService* pref_service = profile->GetPrefs(); 62 if (!CommandLine::ForCurrentProcess()->HasSwitch(
63 if (!pref_service->GetBoolean(prefs::kLabsAdvancedFilesystemEnabled)) { 63 switches::kEnableAdvancedFileSystem)) {
64 return; 64 return;
65 } 65 }
66 if (small) { 66 if (small) {
67 browser = FileBrowseUI::OpenPopup(profile, 67 browser = FileBrowseUI::OpenPopup(profile,
68 url, 68 url,
69 FileBrowseUI::kSmallPopupWidth, 69 FileBrowseUI::kSmallPopupWidth,
70 FileBrowseUI::kSmallPopupHeight); 70 FileBrowseUI::kSmallPopupHeight);
71 } else { 71 } else {
72 browser = FileBrowseUI::OpenPopup(profile, 72 browser = FileBrowseUI::OpenPopup(profile,
73 url, 73 url,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 } 190 }
191 for (size_t x = 0; x < close_these.size(); x++) { 191 for (size_t x = 0; x < close_these.size(); x++) {
192 if (close_these[x]->window()) { 192 if (close_these[x]->window()) {
193 close_these[x]->window()->Close(); 193 close_these[x]->window()->Close();
194 } 194 }
195 } 195 }
196 } 196 }
197 197
198 } // namespace chromeos 198 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dom_ui/labs_handler.cc ('k') | chrome/browser/dom_ui/filebrowse_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698