Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / history / chrome_history_client.cc
index 13b511d..8f359ab 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "base/logging.h"
 #include "chrome/browser/ui/profile_error_dialog.h"
+#include "chrome/common/chrome_version_info.h"
 #include "components/bookmarks/browser/bookmark_model.h"
 #include "grit/chromium_strings.h"
 #include "grit/generated_resources.h"
@@ -45,6 +46,15 @@ void ChromeHistoryClient::NotifyProfileError(sql::InitStatus init_status) {
       IDS_COULDNT_OPEN_PROFILE_ERROR : IDS_PROFILE_TOO_NEW_ERROR);
 }
 
+bool ChromeHistoryClient::ShouldReportDatabaseError() {
+  // TODO(shess): For now, don't report on beta or stable so as not to
+  // overwhelm the crash server.  Once the big fish are fried,
+  // consider reporting at a reduced rate on the bigger channels.
+  chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
+  return channel != chrome::VersionInfo::CHANNEL_STABLE &&
+      channel != chrome::VersionInfo::CHANNEL_BETA;
+}
+
 void ChromeHistoryClient::Shutdown() {
   // It's possible that bookmarks haven't loaded and history is waiting for
   // bookmarks to complete loading. In such a situation history can't shutdown