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/feedback_ui.h" | 5 #include "chrome/browser/ui/webui/feedback_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 Profile::FromWebUI(web_ui()))->file_system(); | 574 Profile::FromWebUI(web_ui()))->file_system(); |
575 file_system->ReadDirectoryByPath( | 575 file_system->ReadDirectoryByPath( |
576 drive::util::ExtractDrivePath(filepath), | 576 drive::util::ExtractDrivePath(filepath), |
577 base::Bind(&ReadDirectoryCallback, max_saved, saved_screenshots, | 577 base::Bind(&ReadDirectoryCallback, max_saved, saved_screenshots, |
578 callback)); | 578 callback)); |
579 } | 579 } |
580 #endif | 580 #endif |
581 | 581 |
582 | 582 |
583 void FeedbackHandler::HandleSendReport(const ListValue* list_value) { | 583 void FeedbackHandler::HandleSendReport(const ListValue* list_value) { |
584 if (!feedback_data_) { | 584 if (!feedback_data_.get()) { |
585 LOG(ERROR) << "Bug report hasn't been intialized yet."; | 585 LOG(ERROR) << "Bug report hasn't been intialized yet."; |
586 return; | 586 return; |
587 } | 587 } |
588 | 588 |
589 ListValue::const_iterator i = list_value->begin(); | 589 ListValue::const_iterator i = list_value->begin(); |
590 std::string page_url; | 590 std::string page_url; |
591 (*i++)->GetAsString(&page_url); | 591 (*i++)->GetAsString(&page_url); |
592 std::string category_tag; | 592 std::string category_tag; |
593 (*i++)->GetAsString(&category_tag); | 593 (*i++)->GetAsString(&category_tag); |
594 std::string description; | 594 std::string description; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 screenshot_filepaths.begin() + sort_size, | 720 screenshot_filepaths.begin() + sort_size, |
721 screenshot_filepaths.end(), | 721 screenshot_filepaths.end(), |
722 ScreenshotTimestampComp); | 722 ScreenshotTimestampComp); |
723 for (size_t i = 0; i < sort_size; ++i) | 723 for (size_t i = 0; i < sort_size; ++i) |
724 saved_screenshots->push_back( | 724 saved_screenshots->push_back( |
725 std::string(ScreenshotSource::kScreenshotUrlRoot) + | 725 std::string(ScreenshotSource::kScreenshotUrlRoot) + |
726 std::string(ScreenshotSource::kScreenshotSaved) + | 726 std::string(ScreenshotSource::kScreenshotSaved) + |
727 screenshot_filepaths[i]); | 727 screenshot_filepaths[i]); |
728 } | 728 } |
729 #endif | 729 #endif |
OLD | NEW |