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

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

Issue 455004: Keep incognito notification preferences separate from regular ones, and don't... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | Annotate | Revision Log
OLDNEW
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 441
442 virtual bool DidLastSessionExitCleanly() { 442 virtual bool DidLastSessionExitCleanly() {
443 return profile_->DidLastSessionExitCleanly(); 443 return profile_->DidLastSessionExitCleanly();
444 } 444 }
445 445
446 virtual BookmarkModel* GetBookmarkModel() { 446 virtual BookmarkModel* GetBookmarkModel() {
447 return profile_->GetBookmarkModel(); 447 return profile_->GetBookmarkModel();
448 } 448 }
449 449
450 virtual DesktopNotificationService* GetDesktopNotificationService() { 450 virtual DesktopNotificationService* GetDesktopNotificationService() {
451 return profile_->GetDesktopNotificationService(); 451 if (!desktop_notification_service_.get()) {
452 desktop_notification_service_.reset(new DesktopNotificationService(
453 this, g_browser_process->notification_ui_manager()));
454 }
455 return desktop_notification_service_.get();
452 } 456 }
453 457
454 virtual ProfileSyncService* GetProfileSyncService() { 458 virtual ProfileSyncService* GetProfileSyncService() {
455 return NULL; 459 return NULL;
456 } 460 }
457 461
458 virtual bool IsSameProfile(Profile* profile) { 462 virtual bool IsSameProfile(Profile* profile) {
459 if (profile == static_cast<Profile*>(this)) 463 if (profile == static_cast<Profile*>(this))
460 return true; 464 return true;
461 return profile == profile_; 465 return profile == profile_;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 Profile* profile_; 539 Profile* profile_;
536 540
537 // The context to use for requests made from this OTR session. 541 // The context to use for requests made from this OTR session.
538 scoped_refptr<ChromeURLRequestContextGetter> request_context_; 542 scoped_refptr<ChromeURLRequestContextGetter> request_context_;
539 543
540 scoped_refptr<ChromeURLRequestContextGetter> extensions_request_context_; 544 scoped_refptr<ChromeURLRequestContextGetter> extensions_request_context_;
541 545
542 // The download manager that only stores downloaded items in memory. 546 // The download manager that only stores downloaded items in memory.
543 scoped_refptr<DownloadManager> download_manager_; 547 scoped_refptr<DownloadManager> download_manager_;
544 548
549 // Use a separate desktop notification service for OTR.
550 scoped_ptr<DesktopNotificationService> desktop_notification_service_;
551
545 // Use a special WebKit context for OTR browsing. 552 // Use a special WebKit context for OTR browsing.
546 scoped_refptr<WebKitContext> webkit_context_; 553 scoped_refptr<WebKitContext> webkit_context_;
547 554
548 // We don't want SSLHostState from the OTR profile to leak back to the main 555 // We don't want SSLHostState from the OTR profile to leak back to the main
549 // profile because then the main profile would learn some of the host names 556 // profile because then the main profile would learn some of the host names
550 // the user visited while OTR. 557 // the user visited while OTR.
551 scoped_ptr<SSLHostState> ssl_host_state_; 558 scoped_ptr<SSLHostState> ssl_host_state_;
552 559
553 // The StrictTransportSecurityState that only stores enabled sites in memory. 560 // The StrictTransportSecurityState that only stores enabled sites in memory.
554 scoped_refptr<net::StrictTransportSecurityState> 561 scoped_refptr<net::StrictTransportSecurityState>
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 } 1329 }
1323 if (!sync_service_.get()) 1330 if (!sync_service_.get())
1324 InitSyncService(); 1331 InitSyncService();
1325 return sync_service_.get(); 1332 return sync_service_.get();
1326 } 1333 }
1327 1334
1328 void ProfileImpl::InitSyncService() { 1335 void ProfileImpl::InitSyncService() {
1329 sync_service_.reset(new ProfileSyncService(this)); 1336 sync_service_.reset(new ProfileSyncService(this));
1330 sync_service_->Initialize(); 1337 sync_service_->Initialize();
1331 } 1338 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698