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

Side by Side Diff: chrome/browser/autocomplete/shortcuts_backend_factory.cc

Issue 853743002: First pass at fixing guest browser cookies issue. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete the Profile Manager. Guest Profile doesn't write to autocomplete/history. Views still needs … Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/feedback/show_feedback_page.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/autocomplete/shortcuts_backend_factory.h" 5 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/autocomplete/shortcuts_backend.h" 8 #include "chrome/browser/autocomplete/shortcuts_backend.h"
9 #include "chrome/browser/history/history_service_factory.h" 9 #include "chrome/browser/history/history_service_factory.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 : RefcountedBrowserContextKeyedServiceFactory( 55 : RefcountedBrowserContextKeyedServiceFactory(
56 "ShortcutsBackend", 56 "ShortcutsBackend",
57 BrowserContextDependencyManager::GetInstance()) { 57 BrowserContextDependencyManager::GetInstance()) {
58 DependsOn(HistoryServiceFactory::GetInstance()); 58 DependsOn(HistoryServiceFactory::GetInstance());
59 } 59 }
60 60
61 ShortcutsBackendFactory::~ShortcutsBackendFactory() {} 61 ShortcutsBackendFactory::~ShortcutsBackendFactory() {}
62 62
63 scoped_refptr<RefcountedKeyedService> 63 scoped_refptr<RefcountedKeyedService>
64 ShortcutsBackendFactory::BuildServiceInstanceFor( 64 ShortcutsBackendFactory::BuildServiceInstanceFor(
65 content::BrowserContext* profile) const { 65 content::BrowserContext* context) const {
66 Profile* profile = static_cast<Profile*>(context);
66 scoped_refptr<ShortcutsBackend> backend( 67 scoped_refptr<ShortcutsBackend> backend(
67 new ShortcutsBackend(static_cast<Profile*>(profile), false)); 68 new ShortcutsBackend(profile, profile->IsGuestSession()));
68 if (backend->Init()) 69 if (backend->Init())
69 return backend; 70 return backend;
70 return NULL; 71 return NULL;
71 } 72 }
72 73
73 bool ShortcutsBackendFactory::ServiceIsNULLWhileTesting() const { 74 bool ShortcutsBackendFactory::ServiceIsNULLWhileTesting() const {
74 return true; 75 return true;
75 } 76 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/feedback/show_feedback_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698