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

Side by Side Diff: chrome/browser/web_data_service_factory.cc

Issue 2107493002: Offer user to send feedback from profile error dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pkasting's & droger's Created 4 years, 4 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
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/web_data_service_factory.h" 5 #include "chrome/browser/web_data_service_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 default: 49 default:
50 NOTREACHED() 50 NOTREACHED()
51 << "Unknown WebDataServiceWrapper::ErrorType: " << error_type; 51 << "Unknown WebDataServiceWrapper::ErrorType: " << error_type;
52 return PROFILE_ERROR_DB_WEB_DATA; 52 return PROFILE_ERROR_DB_WEB_DATA;
53 } 53 }
54 } 54 }
55 55
56 // Callback to show error dialog on profile load error. 56 // Callback to show error dialog on profile load error.
57 void ProfileErrorCallback(WebDataServiceWrapper::ErrorType error_type, 57 void ProfileErrorCallback(WebDataServiceWrapper::ErrorType error_type,
58 sql::InitStatus status) { 58 sql::InitStatus status,
59 ShowProfileErrorDialog( 59 const std::string& diagnostics) {
60 ProfileErrorFromWebDataServiceWrapperError(error_type), 60 ShowProfileErrorDialog(ProfileErrorFromWebDataServiceWrapperError(error_type),
61 (status == sql::INIT_FAILURE) ? 61 (status == sql::INIT_FAILURE)
62 IDS_COULDNT_OPEN_PROFILE_ERROR : IDS_PROFILE_TOO_NEW_ERROR); 62 ? IDS_COULDNT_OPEN_PROFILE_ERROR
63 : IDS_PROFILE_TOO_NEW_ERROR,
64 diagnostics);
63 } 65 }
64 66
65 } // namespace 67 } // namespace
66 68
67 WebDataServiceFactory::WebDataServiceFactory() 69 WebDataServiceFactory::WebDataServiceFactory()
68 : BrowserContextKeyedServiceFactory( 70 : BrowserContextKeyedServiceFactory(
69 "WebDataService", 71 "WebDataService",
70 BrowserContextDependencyManager::GetInstance()) { 72 BrowserContextDependencyManager::GetInstance()) {
71 // WebDataServiceFactory has no dependecies. 73 // WebDataServiceFactory has no dependecies.
72 } 74 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 profile_path, g_browser_process->GetApplicationLocale(), 171 profile_path, g_browser_process->GetApplicationLocale(),
170 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), 172 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
171 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB), 173 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
172 sync_start_util::GetFlareForSyncableService(profile_path), 174 sync_start_util::GetFlareForSyncableService(profile_path),
173 &ProfileErrorCallback); 175 &ProfileErrorCallback);
174 } 176 }
175 177
176 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const { 178 bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const {
177 return true; 179 return true;
178 } 180 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/simple_message_box_views.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698