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

Side by Side Diff: chrome/browser/media_galleries/media_galleries_test_util.cc

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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) 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/media_galleries/media_galleries_test_util.h" 5 #include "chrome/browser/media_galleries/media_galleries_test_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 EXPECT_TRUE(extension.get() != NULL) << errors; 53 EXPECT_TRUE(extension.get() != NULL) << errors;
54 EXPECT_TRUE(extensions::Extension::IdIsValid(extension->id())); 54 EXPECT_TRUE(extensions::Extension::IdIsValid(extension->id()));
55 if (!extension.get() || !extensions::Extension::IdIsValid(extension->id())) 55 if (!extension.get() || !extensions::Extension::IdIsValid(extension->id()))
56 return NULL; 56 return NULL;
57 57
58 extension_prefs->OnExtensionInstalled( 58 extension_prefs->OnExtensionInstalled(
59 extension.get(), extensions::Extension::ENABLED, 59 extension.get(), extensions::Extension::ENABLED,
60 syncer::StringOrdinal::CreateInitialOrdinal()); 60 syncer::StringOrdinal::CreateInitialOrdinal());
61 ExtensionService* extension_service = 61 ExtensionService* extension_service =
62 extensions::ExtensionSystem::Get(profile)->extension_service(); 62 extensions::ExtensionSystem::Get(profile)->extension_service();
63 extension_service->AddExtension(extension); 63 extension_service->AddExtension(extension.get());
64 extension_service->EnableExtension(extension->id()); 64 extension_service->EnableExtension(extension->id());
65 65
66 return extension; 66 return extension;
67 } 67 }
68 68
69 EnsureMediaDirectoriesExists::EnsureMediaDirectoriesExists() 69 EnsureMediaDirectoriesExists::EnsureMediaDirectoriesExists()
70 : num_galleries_(0) { 70 : num_galleries_(0) {
71 Init(); 71 Init();
72 } 72 }
73 73
(...skipping 23 matching lines...) Expand all
97 if (PathService::Get(kDirectoryKeys[i], &path) && 97 if (PathService::Get(kDirectoryKeys[i], &path) &&
98 file_util::DirectoryExists(path)) { 98 file_util::DirectoryExists(path)) {
99 ++num_galleries_; 99 ++num_galleries_;
100 } 100 }
101 } 101 }
102 ASSERT_GT(num_galleries_, 0); 102 ASSERT_GT(num_galleries_, 0);
103 #endif 103 #endif
104 } 104 }
105 105
106 } // namespace chrome 106 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/media_file_system_registry.cc ('k') | chrome/browser/nacl_host/nacl_file_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698