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

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

Issue 20003005: Fix remaining leaks in StorageMonitorLinux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 4 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
« no previous file with comments | « chrome/browser/storage_monitor/test_storage_monitor.h ('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_browser_process.h" 5 #include "chrome/test/base/testing_browser_process.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/background/background_mode_manager.h" 10 #include "chrome/browser/background/background_mode_manager.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 #else 322 #else
323 return bookmark_prompt_controller_.get(); 323 return bookmark_prompt_controller_.get();
324 #endif 324 #endif
325 } 325 }
326 326
327 chrome::StorageMonitor* TestingBrowserProcess::storage_monitor() { 327 chrome::StorageMonitor* TestingBrowserProcess::storage_monitor() {
328 #if defined(OS_IOS) || defined(OS_ANDROID) 328 #if defined(OS_IOS) || defined(OS_ANDROID)
329 NOTIMPLEMENTED(); 329 NOTIMPLEMENTED();
330 return NULL; 330 return NULL;
331 #else 331 #else
332 if (!storage_monitor_.get()) {
333 chrome::test::TestStorageMonitor* monitor =
vandebo (ex-Chrome) 2013/07/24 14:42:59 Why get rid of this, this is how a lot of things i
334 new chrome::test::TestStorageMonitor();
335 monitor->Init();
336 monitor->MarkInitialized();
337 storage_monitor_.reset(monitor);
338 }
339 return storage_monitor_.get(); 332 return storage_monitor_.get();
340 #endif 333 #endif
341 } 334 }
342 335
343 chrome::MediaFileSystemRegistry* 336 chrome::MediaFileSystemRegistry*
344 TestingBrowserProcess::media_file_system_registry() { 337 TestingBrowserProcess::media_file_system_registry() {
345 #if defined(OS_IOS) || defined(OS_ANDROID) 338 #if defined(OS_IOS) || defined(OS_ANDROID)
346 NOTIMPLEMENTED(); 339 NOTIMPLEMENTED();
347 return NULL; 340 return NULL;
348 #else 341 #else
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 SafeBrowsingService* sb_service) { 408 SafeBrowsingService* sb_service) {
416 #if !defined(OS_IOS) 409 #if !defined(OS_IOS)
417 NOTIMPLEMENTED(); 410 NOTIMPLEMENTED();
418 sb_service_ = sb_service; 411 sb_service_ = sb_service;
419 #endif 412 #endif
420 } 413 }
421 414
422 void TestingBrowserProcess::SetStorageMonitor( 415 void TestingBrowserProcess::SetStorageMonitor(
423 scoped_ptr<chrome::StorageMonitor> storage_monitor) { 416 scoped_ptr<chrome::StorageMonitor> storage_monitor) {
424 #if !defined(OS_IOS) && !defined(OS_ANDROID) 417 #if !defined(OS_IOS) && !defined(OS_ANDROID)
425 storage_monitor_.reset(storage_monitor.release()); 418 storage_monitor_ = storage_monitor.Pass();
426 #endif 419 #endif
427 } 420 }
OLDNEW
« no previous file with comments | « chrome/browser/storage_monitor/test_storage_monitor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698