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

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

Issue 14093022: Remove DrivePrefetcher and relevant flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: xxxxx Created 7 years, 8 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // is called again). In that case, we have to forget the last sent ID here, 382 // is called again). In that case, we have to forget the last sent ID here,
383 // and resent whole the logs to the page. 383 // and resent whole the logs to the page.
384 last_sent_event_id_ = -1; 384 last_sent_event_id_ = -1;
385 UpdateEventLogSection(); 385 UpdateEventLogSection();
386 } 386 }
387 387
388 void DriveInternalsWebUIHandler::UpdateDriveRelatedFlagsSection() { 388 void DriveInternalsWebUIHandler::UpdateDriveRelatedFlagsSection() {
389 const char* kDriveRelatedFlags[] = { 389 const char* kDriveRelatedFlags[] = {
390 google_apis::switches::kEnableDriveV2Api, 390 google_apis::switches::kEnableDriveV2Api,
391 switches::kDisableDrive, 391 switches::kDisableDrive,
392 switches::kEnableDrivePrefetch,
393 }; 392 };
394 393
395 base::ListValue flags; 394 base::ListValue flags;
396 for (size_t i = 0; i < arraysize(kDriveRelatedFlags); ++i) { 395 for (size_t i = 0; i < arraysize(kDriveRelatedFlags); ++i) {
397 const std::string key = kDriveRelatedFlags[i]; 396 const std::string key = kDriveRelatedFlags[i];
398 std::string value = "(not set)"; 397 std::string value = "(not set)";
399 if (CommandLine::ForCurrentProcess()->HasSwitch(key)) 398 if (CommandLine::ForCurrentProcess()->HasSwitch(key))
400 value = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(key); 399 value = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(key);
401 base::DictionaryValue* flag = new DictionaryValue; 400 base::DictionaryValue* flag = new DictionaryValue;
402 flag->SetString("key", key); 401 flag->SetString("key", key);
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 content::WebUIDataSource::Create(chrome::kChromeUIDriveInternalsHost); 741 content::WebUIDataSource::Create(chrome::kChromeUIDriveInternalsHost);
743 source->AddResourcePath("drive_internals.css", IDR_DRIVE_INTERNALS_CSS); 742 source->AddResourcePath("drive_internals.css", IDR_DRIVE_INTERNALS_CSS);
744 source->AddResourcePath("drive_internals.js", IDR_DRIVE_INTERNALS_JS); 743 source->AddResourcePath("drive_internals.js", IDR_DRIVE_INTERNALS_JS);
745 source->SetDefaultResource(IDR_DRIVE_INTERNALS_HTML); 744 source->SetDefaultResource(IDR_DRIVE_INTERNALS_HTML);
746 745
747 Profile* profile = Profile::FromWebUI(web_ui); 746 Profile* profile = Profile::FromWebUI(web_ui);
748 content::WebUIDataSource::Add(profile, source); 747 content::WebUIDataSource::Add(profile, source);
749 } 748 }
750 749
751 } // namespace chromeos 750 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/job_scheduler_unittest.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698