OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/profiles/profile.h" | 5 #include "chrome/browser/profiles/profile.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { | 468 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { |
469 return profile_->GetUserStyleSheetWatcher(); | 469 return profile_->GetUserStyleSheetWatcher(); |
470 } | 470 } |
471 | 471 |
472 virtual FindBarState* GetFindBarState() { | 472 virtual FindBarState* GetFindBarState() { |
473 if (!find_bar_state_.get()) | 473 if (!find_bar_state_.get()) |
474 find_bar_state_.reset(new FindBarState()); | 474 find_bar_state_.reset(new FindBarState()); |
475 return find_bar_state_.get(); | 475 return find_bar_state_.get(); |
476 } | 476 } |
477 | 477 |
478 virtual SessionService* GetSessionService() { | |
479 // Don't save any sessions when incognito. | |
480 return NULL; | |
481 } | |
482 | |
483 virtual void ShutdownSessionService() { | |
484 // We don't allow a session service, nothing to do. | |
485 } | |
486 | |
487 virtual bool HasSessionService() const { | |
488 // We never have a session service. | |
489 return false; | |
490 } | |
491 | |
492 virtual bool HasProfileSyncService() const { | 478 virtual bool HasProfileSyncService() const { |
493 // We never have a profile sync service. | 479 // We never have a profile sync service. |
494 return false; | 480 return false; |
495 } | 481 } |
496 | 482 |
497 virtual bool DidLastSessionExitCleanly() { | 483 virtual bool DidLastSessionExitCleanly() { |
498 return profile_->DidLastSessionExitCleanly(); | 484 return profile_->DidLastSessionExitCleanly(); |
499 } | 485 } |
500 | 486 |
501 virtual BookmarkModel* GetBookmarkModel() { | 487 virtual BookmarkModel* GetBookmarkModel() { |
(...skipping 26 matching lines...) Expand all Loading... |
528 } | 514 } |
529 | 515 |
530 virtual bool IsSameProfile(Profile* profile) { | 516 virtual bool IsSameProfile(Profile* profile) { |
531 return (profile == this) || (profile == profile_); | 517 return (profile == this) || (profile == profile_); |
532 } | 518 } |
533 | 519 |
534 virtual Time GetStartTime() const { | 520 virtual Time GetStartTime() const { |
535 return start_time_; | 521 return start_time_; |
536 } | 522 } |
537 | 523 |
538 virtual TabRestoreService* GetTabRestoreService() { | |
539 return NULL; | |
540 } | |
541 | |
542 virtual void ResetTabRestoreService() { | |
543 } | |
544 | |
545 virtual SpellCheckHost* GetSpellCheckHost() { | 524 virtual SpellCheckHost* GetSpellCheckHost() { |
546 return profile_->GetSpellCheckHost(); | 525 return profile_->GetSpellCheckHost(); |
547 } | 526 } |
548 | 527 |
549 virtual void ReinitializeSpellCheckHost(bool force) { | 528 virtual void ReinitializeSpellCheckHost(bool force) { |
550 profile_->ReinitializeSpellCheckHost(force); | 529 profile_->ReinitializeSpellCheckHost(force); |
551 } | 530 } |
552 | 531 |
553 virtual WebKitContext* GetWebKitContext() { | 532 virtual WebKitContext* GetWebKitContext() { |
554 if (!webkit_context_.get()) { | 533 if (!webkit_context_.get()) { |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 }; | 746 }; |
768 #endif | 747 #endif |
769 | 748 |
770 Profile* Profile::CreateOffTheRecordProfile() { | 749 Profile* Profile::CreateOffTheRecordProfile() { |
771 #if defined(OS_CHROMEOS) | 750 #if defined(OS_CHROMEOS) |
772 if (Profile::IsGuestSession()) | 751 if (Profile::IsGuestSession()) |
773 return new GuestSessionProfile(this); | 752 return new GuestSessionProfile(this); |
774 #endif | 753 #endif |
775 return new OffTheRecordProfileImpl(this); | 754 return new OffTheRecordProfileImpl(this); |
776 } | 755 } |
OLD | NEW |