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

Side by Side Diff: blimp/client/core/feedback/blimp_feedback_data.cc

Issue 2624903006: Remove all blimp client code. (Closed)
Patch Set: Update buildbot configuration Created 3 years, 11 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "blimp/client/core/feedback/blimp_feedback_data.h"
6
7 #include "blimp/client/core/contents/blimp_contents_manager.h"
8
9 namespace blimp {
10 namespace client {
11 const char kFeedbackSupportedKey[] = "Blimp Supported";
12 const char kFeedbackHasVisibleBlimpContents[] = "Blimp Visible";
13 const char kFeedbackUserNameKey[] = "Blimp Account";
14
15 namespace {
16 std::string HasVisibleBlimpContents(
17 BlimpContentsManager* blimp_contents_manager) {
18 std::vector<BlimpContentsImpl*> all_blimp_contents =
19 blimp_contents_manager->GetAllActiveBlimpContents();
20 for (const auto& item : all_blimp_contents) {
21 if (item->document_manager()->visible()) {
22 return "true";
23 }
24 }
25 return "false";
26 }
27 } // namespace
28
29 std::unordered_map<std::string, std::string> CreateBlimpFeedbackData(
30 BlimpContentsManager* blimp_contents_manager,
31 const std::string& username) {
32 std::unordered_map<std::string, std::string> data;
33 data.insert(std::make_pair(kFeedbackSupportedKey, "true"));
34 data.insert(std::make_pair(kFeedbackHasVisibleBlimpContents,
35 HasVisibleBlimpContents(blimp_contents_manager)));
36 data.insert(std::make_pair(kFeedbackUserNameKey, username));
37 return data;
38 }
39
40 } // namespace client
41 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/core/feedback/blimp_feedback_data.h ('k') | blimp/client/core/feedback/blimp_feedback_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698