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

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

Issue 7248038: Profiles: Make NTPResourceCache a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test compile Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 } 616 }
617 617
618 virtual void InitPromoResources() { 618 virtual void InitPromoResources() {
619 NOTREACHED(); 619 NOTREACHED();
620 } 620 }
621 621
622 virtual void InitRegisteredProtocolHandlers() { 622 virtual void InitRegisteredProtocolHandlers() {
623 NOTREACHED(); 623 NOTREACHED();
624 } 624 }
625 625
626 virtual NTPResourceCache* GetNTPResourceCache() {
627 // Just return the real profile resource cache.
628 return profile_->GetNTPResourceCache();
629 }
630
631 virtual FilePath last_selected_directory() { 626 virtual FilePath last_selected_directory() {
632 const FilePath& directory = last_selected_directory_; 627 const FilePath& directory = last_selected_directory_;
633 if (directory.empty()) { 628 if (directory.empty()) {
634 return profile_->last_selected_directory(); 629 return profile_->last_selected_directory();
635 } 630 }
636 return directory; 631 return directory;
637 } 632 }
638 633
639 virtual void set_last_selected_directory(const FilePath& path) { 634 virtual void set_last_selected_directory(const FilePath& path) {
640 last_selected_directory_ = path; 635 last_selected_directory_ = path;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 }; 847 };
853 #endif 848 #endif
854 849
855 Profile* Profile::CreateOffTheRecordProfile() { 850 Profile* Profile::CreateOffTheRecordProfile() {
856 #if defined(OS_CHROMEOS) 851 #if defined(OS_CHROMEOS)
857 if (Profile::IsGuestSession()) 852 if (Profile::IsGuestSession())
858 return new GuestSessionProfile(this); 853 return new GuestSessionProfile(this);
859 #endif 854 #endif
860 return new OffTheRecordProfileImpl(this); 855 return new OffTheRecordProfileImpl(this);
861 } 856 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698