OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 integration_service->ClearCacheAndRemountFileSystem( | 585 integration_service->ClearCacheAndRemountFileSystem( |
586 base::Bind(&DriveInternalsWebUIHandler::ResetFinished, | 586 base::Bind(&DriveInternalsWebUIHandler::ResetFinished, |
587 weak_ptr_factory_.GetWeakPtr())); | 587 weak_ptr_factory_.GetWeakPtr())); |
588 } | 588 } |
589 } | 589 } |
590 | 590 |
591 void DriveInternalsWebUIHandler::ResetFinished(bool success) { | 591 void DriveInternalsWebUIHandler::ResetFinished(bool success) { |
592 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 592 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
593 | 593 |
594 web_ui()->CallJavascriptFunctionUnsafe("updateResetStatus", | 594 web_ui()->CallJavascriptFunctionUnsafe("updateResetStatus", |
595 base::FundamentalValue(success)); | 595 base::Value(success)); |
596 } | 596 } |
597 | 597 |
598 void DriveInternalsWebUIHandler::ListFileEntries(const base::ListValue* args) { | 598 void DriveInternalsWebUIHandler::ListFileEntries(const base::ListValue* args) { |
599 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 599 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
600 | 600 |
601 UpdateFileSystemContentsSection(); | 601 UpdateFileSystemContentsSection(); |
602 } | 602 } |
603 | 603 |
604 void DriveInternalsWebUIHandler::UpdateDeltaUpdateStatusSection( | 604 void DriveInternalsWebUIHandler::UpdateDeltaUpdateStatusSection( |
605 drive::DebugInfoCollector* debug_info_collector) { | 605 drive::DebugInfoCollector* debug_info_collector) { |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 content::WebUIDataSource::Create(chrome::kChromeUIDriveInternalsHost); | 899 content::WebUIDataSource::Create(chrome::kChromeUIDriveInternalsHost); |
900 source->AddResourcePath("drive_internals.css", IDR_DRIVE_INTERNALS_CSS); | 900 source->AddResourcePath("drive_internals.css", IDR_DRIVE_INTERNALS_CSS); |
901 source->AddResourcePath("drive_internals.js", IDR_DRIVE_INTERNALS_JS); | 901 source->AddResourcePath("drive_internals.js", IDR_DRIVE_INTERNALS_JS); |
902 source->SetDefaultResource(IDR_DRIVE_INTERNALS_HTML); | 902 source->SetDefaultResource(IDR_DRIVE_INTERNALS_HTML); |
903 | 903 |
904 Profile* profile = Profile::FromWebUI(web_ui); | 904 Profile* profile = Profile::FromWebUI(web_ui); |
905 content::WebUIDataSource::Add(profile, source); | 905 content::WebUIDataSource::Add(profile, source); |
906 } | 906 } |
907 | 907 |
908 } // namespace chromeos | 908 } // namespace chromeos |
OLD | NEW |