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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 9447034: Android: Guard off desktop notifications (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixing rebase Created 8 years, 9 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 | « chrome/chrome_browser.gypi ('k') | no next file » | 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/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 base::Bind(&TestingProfile::FinishInit, 191 base::Bind(&TestingProfile::FinishInit,
192 base::Unretained(this))); 192 base::Unretained(this)));
193 } else { 193 } else {
194 FinishInit(); 194 FinishInit();
195 } 195 }
196 } 196 }
197 197
198 void TestingProfile::Init() { 198 void TestingProfile::Init() {
199 profile_dependency_manager_->CreateProfileServices(this, true); 199 profile_dependency_manager_->CreateProfileServices(this, true);
200 200
201 #if defined(ENABLE_NOTIFICATIONS)
201 // Install profile keyed service factory hooks for dummy/test services 202 // Install profile keyed service factory hooks for dummy/test services
202 DesktopNotificationServiceFactory::GetInstance()->SetTestingFactory( 203 DesktopNotificationServiceFactory::GetInstance()->SetTestingFactory(
203 this, CreateTestDesktopNotificationService); 204 this, CreateTestDesktopNotificationService);
205 #endif
204 } 206 }
205 207
206 void TestingProfile::FinishInit() { 208 void TestingProfile::FinishInit() {
207 DCHECK(content::NotificationService::current()); 209 DCHECK(content::NotificationService::current());
208 content::NotificationService::current()->Notify( 210 content::NotificationService::current()->Notify(
209 chrome::NOTIFICATION_PROFILE_CREATED, 211 chrome::NOTIFICATION_PROFILE_CREATED,
210 content::Source<Profile>(static_cast<Profile*>(this)), 212 content::Source<Profile>(static_cast<Profile*>(this)),
211 content::NotificationService::NoDetails()); 213 content::NotificationService::NoDetails());
212 214
213 if (delegate_) 215 if (delegate_)
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 759 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
758 return GetExtensionSpecialStoragePolicy(); 760 return GetExtensionSpecialStoragePolicy();
759 } 761 }
760 762
761 void TestingProfile::DestroyWebDataService() { 763 void TestingProfile::DestroyWebDataService() {
762 if (!web_data_service_.get()) 764 if (!web_data_service_.get())
763 return; 765 return;
764 766
765 web_data_service_->Shutdown(); 767 web_data_service_->Shutdown();
766 } 768 }
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698