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

Side by Side Diff: chrome/browser/ui/webui/chromeos/drive_internals_ui.cc

Issue 14820030: Move Chrome OS switches to chromeos/chromeos_switches.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits Created 7 years, 7 months 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) 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/webui/chromeos/drive_internals_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/drive_internals_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/google_apis/drive_api_util.h" 25 #include "chrome/browser/google_apis/drive_api_util.h"
26 #include "chrome/browser/google_apis/drive_notification_manager.h" 26 #include "chrome/browser/google_apis/drive_notification_manager.h"
27 #include "chrome/browser/google_apis/drive_notification_manager_factory.h" 27 #include "chrome/browser/google_apis/drive_notification_manager_factory.h"
28 #include "chrome/browser/google_apis/drive_service_interface.h" 28 #include "chrome/browser/google_apis/drive_service_interface.h"
29 #include "chrome/browser/google_apis/drive_switches.h" 29 #include "chrome/browser/google_apis/drive_switches.h"
30 #include "chrome/browser/google_apis/event_logger.h" 30 #include "chrome/browser/google_apis/event_logger.h"
31 #include "chrome/browser/google_apis/gdata_errorcode.h" 31 #include "chrome/browser/google_apis/gdata_errorcode.h"
32 #include "chrome/browser/google_apis/gdata_wapi_parser.h" 32 #include "chrome/browser/google_apis/gdata_wapi_parser.h"
33 #include "chrome/browser/google_apis/time_util.h" 33 #include "chrome/browser/google_apis/time_util.h"
34 #include "chrome/browser/profiles/profile.h" 34 #include "chrome/browser/profiles/profile.h"
35 #include "chrome/common/chrome_switches.h"
36 #include "chrome/common/pref_names.h" 35 #include "chrome/common/pref_names.h"
37 #include "chrome/common/url_constants.h" 36 #include "chrome/common/url_constants.h"
37 #include "chromeos/chromeos_switches.h"
38 #include "content/public/browser/browser_thread.h" 38 #include "content/public/browser/browser_thread.h"
39 #include "content/public/browser/web_ui.h" 39 #include "content/public/browser/web_ui.h"
40 #include "content/public/browser/web_ui_data_source.h" 40 #include "content/public/browser/web_ui_data_source.h"
41 #include "content/public/browser/web_ui_message_handler.h" 41 #include "content/public/browser/web_ui_message_handler.h"
42 #include "grit/browser_resources.h" 42 #include "grit/browser_resources.h"
43 43
44 using content::BrowserThread; 44 using content::BrowserThread;
45 45
46 namespace chromeos { 46 namespace chromeos {
47 47
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 // and resent whole the logs to the page. 402 // and resent whole the logs to the page.
403 last_sent_event_id_ = -1; 403 last_sent_event_id_ = -1;
404 UpdateEventLogSection(); 404 UpdateEventLogSection();
405 } 405 }
406 406
407 void DriveInternalsWebUIHandler::UpdateDriveRelatedFlagsSection() { 407 void DriveInternalsWebUIHandler::UpdateDriveRelatedFlagsSection() {
408 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 408 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
409 409
410 const char* kDriveRelatedFlags[] = { 410 const char* kDriveRelatedFlags[] = {
411 google_apis::switches::kEnableDriveV2Api, 411 google_apis::switches::kEnableDriveV2Api,
412 switches::kDisableDrive, 412 chromeos::switches::kDisableDrive,
413 }; 413 };
414 414
415 base::ListValue flags; 415 base::ListValue flags;
416 for (size_t i = 0; i < arraysize(kDriveRelatedFlags); ++i) { 416 for (size_t i = 0; i < arraysize(kDriveRelatedFlags); ++i) {
417 const std::string key = kDriveRelatedFlags[i]; 417 const std::string key = kDriveRelatedFlags[i];
418 std::string value = "(not set)"; 418 std::string value = "(not set)";
419 if (CommandLine::ForCurrentProcess()->HasSwitch(key)) 419 if (CommandLine::ForCurrentProcess()->HasSwitch(key))
420 value = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(key); 420 value = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(key);
421 base::DictionaryValue* flag = new DictionaryValue; 421 base::DictionaryValue* flag = new DictionaryValue;
422 flag->SetString("key", key); 422 flag->SetString("key", key);
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 content::WebUIDataSource::Create(chrome::kChromeUIDriveInternalsHost); 802 content::WebUIDataSource::Create(chrome::kChromeUIDriveInternalsHost);
803 source->AddResourcePath("drive_internals.css", IDR_DRIVE_INTERNALS_CSS); 803 source->AddResourcePath("drive_internals.css", IDR_DRIVE_INTERNALS_CSS);
804 source->AddResourcePath("drive_internals.js", IDR_DRIVE_INTERNALS_JS); 804 source->AddResourcePath("drive_internals.js", IDR_DRIVE_INTERNALS_JS);
805 source->SetDefaultResource(IDR_DRIVE_INTERNALS_HTML); 805 source->SetDefaultResource(IDR_DRIVE_INTERNALS_HTML);
806 806
807 Profile* profile = Profile::FromWebUI(web_ui); 807 Profile* profile = Profile::FromWebUI(web_ui);
808 content::WebUIDataSource::Add(profile, source); 808 content::WebUIDataSource::Add(profile, source);
809 } 809 }
810 810
811 } // namespace chromeos 811 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc ('k') | chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698