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/crashes_ui.h" | 5 #include "chrome/browser/ui/webui/crashes_ui.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 //////////////////////////////////////////////////////////////////////////////// | 65 //////////////////////////////////////////////////////////////////////////////// |
66 // | 66 // |
67 // CrashesDOMHandler | 67 // CrashesDOMHandler |
68 // | 68 // |
69 //////////////////////////////////////////////////////////////////////////////// | 69 //////////////////////////////////////////////////////////////////////////////// |
70 | 70 |
71 // The handler for Javascript messages for the chrome://crashes/ page. | 71 // The handler for Javascript messages for the chrome://crashes/ page. |
72 class CrashesDOMHandler : public WebUIMessageHandler, | 72 class CrashesDOMHandler : public WebUIMessageHandler, |
73 public CrashUploadList::Delegate { | 73 public CrashUploadList::Delegate { |
74 public: | 74 public: |
75 explicit CrashesDOMHandler(); | 75 CrashesDOMHandler(); |
76 virtual ~CrashesDOMHandler(); | 76 virtual ~CrashesDOMHandler(); |
77 | 77 |
78 // WebUIMessageHandler implementation. | 78 // WebUIMessageHandler implementation. |
79 virtual void RegisterMessages() OVERRIDE; | 79 virtual void RegisterMessages() OVERRIDE; |
80 | 80 |
81 // CrashUploadList::Delegate implemenation. | 81 // CrashUploadList::Delegate implemenation. |
82 virtual void OnCrashListAvailable() OVERRIDE; | 82 virtual void OnCrashListAvailable() OVERRIDE; |
83 | 83 |
84 private: | 84 private: |
85 // Asynchronously fetches the list of crashes. Called from JS. | 85 // Asynchronously fetches the list of crashes. Called from JS. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 return prefs->GetBoolean(prefs::kMetricsReportingEnabled); | 182 return prefs->GetBoolean(prefs::kMetricsReportingEnabled); |
183 #elif defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) | 183 #elif defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) |
184 bool reporting_enabled = false; | 184 bool reporting_enabled = false; |
185 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, | 185 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, |
186 &reporting_enabled); | 186 &reporting_enabled); |
187 return reporting_enabled; | 187 return reporting_enabled; |
188 #else | 188 #else |
189 return false; | 189 return false; |
190 #endif | 190 #endif |
191 } | 191 } |
OLD | NEW |