| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/profile.h" | 5 #include "chrome/browser/profile.h" |
| 6 | 6 |
| 7 #include "app/theme_provider.h" | 7 #include "app/theme_provider.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 WebKitContext* ProfileImpl::GetWebKitContext() { | 1301 WebKitContext* ProfileImpl::GetWebKitContext() { |
| 1302 if (!webkit_context_.get()) | 1302 if (!webkit_context_.get()) |
| 1303 webkit_context_ = new WebKitContext(path_, false); | 1303 webkit_context_ = new WebKitContext(path_, false); |
| 1304 DCHECK(webkit_context_.get()); | 1304 DCHECK(webkit_context_.get()); |
| 1305 return webkit_context_.get(); | 1305 return webkit_context_.get(); |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 DesktopNotificationService* ProfileImpl::GetDesktopNotificationService() { | 1308 DesktopNotificationService* ProfileImpl::GetDesktopNotificationService() { |
| 1309 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); | 1309 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); |
| 1310 if (!desktop_notification_service_.get()) { | 1310 if (!desktop_notification_service_.get()) { |
| 1311 // TODO(johnnyg): hook this up with notification UI manager. | |
| 1312 desktop_notification_service_.reset(new DesktopNotificationService( | 1311 desktop_notification_service_.reset(new DesktopNotificationService( |
| 1313 this, NULL)); | 1312 this, g_browser_process->notification_ui_manager())); |
| 1314 } | 1313 } |
| 1315 | |
| 1316 return desktop_notification_service_.get(); | 1314 return desktop_notification_service_.get(); |
| 1317 } | 1315 } |
| 1318 | 1316 |
| 1319 void ProfileImpl::MarkAsCleanShutdown() { | 1317 void ProfileImpl::MarkAsCleanShutdown() { |
| 1320 if (prefs_.get()) { | 1318 if (prefs_.get()) { |
| 1321 // The session cleanly exited, set kSessionExitedCleanly appropriately. | 1319 // The session cleanly exited, set kSessionExitedCleanly appropriately. |
| 1322 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); | 1320 prefs_->SetBoolean(prefs::kSessionExitedCleanly, true); |
| 1323 | 1321 |
| 1324 // NOTE: If you change what thread this writes on, be sure and update | 1322 // NOTE: If you change what thread this writes on, be sure and update |
| 1325 // ChromeFrame::EndSession(). | 1323 // ChromeFrame::EndSession(). |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 return sync_service_.get(); | 1359 return sync_service_.get(); |
| 1362 } | 1360 } |
| 1363 #endif | 1361 #endif |
| 1364 return NULL; | 1362 return NULL; |
| 1365 } | 1363 } |
| 1366 | 1364 |
| 1367 void ProfileImpl::InitSyncService() { | 1365 void ProfileImpl::InitSyncService() { |
| 1368 sync_service_.reset(new ProfileSyncService(this)); | 1366 sync_service_.reset(new ProfileSyncService(this)); |
| 1369 sync_service_->Initialize(); | 1367 sync_service_->Initialize(); |
| 1370 } | 1368 } |
| OLD | NEW |