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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { | 485 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { |
486 return profile_->GetUserStyleSheetWatcher(); | 486 return profile_->GetUserStyleSheetWatcher(); |
487 } | 487 } |
488 | 488 |
489 virtual FindBarState* GetFindBarState() { | 489 virtual FindBarState* GetFindBarState() { |
490 if (!find_bar_state_.get()) | 490 if (!find_bar_state_.get()) |
491 find_bar_state_.reset(new FindBarState()); | 491 find_bar_state_.reset(new FindBarState()); |
492 return find_bar_state_.get(); | 492 return find_bar_state_.get(); |
493 } | 493 } |
494 | 494 |
495 virtual SessionService* GetSessionService() { | |
496 // Don't save any sessions when incognito. | |
497 return NULL; | |
498 } | |
499 | |
500 virtual void ShutdownSessionService() { | |
501 // We don't allow a session service, nothing to do. | |
502 } | |
503 | |
504 virtual bool HasSessionService() const { | |
505 // We never have a session service. | |
506 return false; | |
507 } | |
508 | |
509 virtual bool HasProfileSyncService() const { | 495 virtual bool HasProfileSyncService() const { |
510 // We never have a profile sync service. | 496 // We never have a profile sync service. |
511 return false; | 497 return false; |
512 } | 498 } |
513 | 499 |
514 virtual bool DidLastSessionExitCleanly() { | 500 virtual bool DidLastSessionExitCleanly() { |
515 return profile_->DidLastSessionExitCleanly(); | 501 return profile_->DidLastSessionExitCleanly(); |
516 } | 502 } |
517 | 503 |
518 virtual BookmarkModel* GetBookmarkModel() { | 504 virtual BookmarkModel* GetBookmarkModel() { |
(...skipping 26 matching lines...) Expand all Loading... |
545 } | 531 } |
546 | 532 |
547 virtual bool IsSameProfile(Profile* profile) { | 533 virtual bool IsSameProfile(Profile* profile) { |
548 return (profile == this) || (profile == profile_); | 534 return (profile == this) || (profile == profile_); |
549 } | 535 } |
550 | 536 |
551 virtual Time GetStartTime() const { | 537 virtual Time GetStartTime() const { |
552 return start_time_; | 538 return start_time_; |
553 } | 539 } |
554 | 540 |
555 virtual TabRestoreService* GetTabRestoreService() { | |
556 return NULL; | |
557 } | |
558 | |
559 virtual void ResetTabRestoreService() { | |
560 } | |
561 | |
562 virtual SpellCheckHost* GetSpellCheckHost() { | 541 virtual SpellCheckHost* GetSpellCheckHost() { |
563 return profile_->GetSpellCheckHost(); | 542 return profile_->GetSpellCheckHost(); |
564 } | 543 } |
565 | 544 |
566 virtual void ReinitializeSpellCheckHost(bool force) { | 545 virtual void ReinitializeSpellCheckHost(bool force) { |
567 profile_->ReinitializeSpellCheckHost(force); | 546 profile_->ReinitializeSpellCheckHost(force); |
568 } | 547 } |
569 | 548 |
570 virtual WebKitContext* GetWebKitContext() { | 549 virtual WebKitContext* GetWebKitContext() { |
571 if (!webkit_context_.get()) { | 550 if (!webkit_context_.get()) { |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 }; | 761 }; |
783 #endif | 762 #endif |
784 | 763 |
785 Profile* Profile::CreateOffTheRecordProfile() { | 764 Profile* Profile::CreateOffTheRecordProfile() { |
786 #if defined(OS_CHROMEOS) | 765 #if defined(OS_CHROMEOS) |
787 if (Profile::IsGuestSession()) | 766 if (Profile::IsGuestSession()) |
788 return new GuestSessionProfile(this); | 767 return new GuestSessionProfile(this); |
789 #endif | 768 #endif |
790 return new OffTheRecordProfileImpl(this); | 769 return new OffTheRecordProfileImpl(this); |
791 } | 770 } |
OLD | NEW |