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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 EXPECT_FALSE(dialog_); 54 EXPECT_FALSE(dialog_);
55 } 55 }
56 56
57 void SetUp() override { 57 void SetUp() override {
58 ASSERT_TRUE(TestStorageMonitor::CreateAndInstall()); 58 ASSERT_TRUE(TestStorageMonitor::CreateAndInstall());
59 59
60 extensions::TestExtensionSystem* extension_system( 60 extensions::TestExtensionSystem* extension_system(
61 static_cast<extensions::TestExtensionSystem*>( 61 static_cast<extensions::TestExtensionSystem*>(
62 extensions::ExtensionSystem::Get(profile_.get()))); 62 extensions::ExtensionSystem::Get(profile_.get())));
63 extension_system->CreateExtensionService( 63 extension_system->CreateExtensionService(
64 CommandLine::ForCurrentProcess(), base::FilePath(), false); 64 base::CommandLine::ForCurrentProcess(), base::FilePath(), false);
65 65
66 gallery_prefs_.reset(new MediaGalleriesPreferences(profile_.get())); 66 gallery_prefs_.reset(new MediaGalleriesPreferences(profile_.get()));
67 base::RunLoop loop; 67 base::RunLoop loop;
68 gallery_prefs_->EnsureInitialized(loop.QuitClosure()); 68 gallery_prefs_->EnsureInitialized(loop.QuitClosure());
69 loop.Run(); 69 loop.Run();
70 70
71 std::vector<std::string> read_permissions; 71 std::vector<std::string> read_permissions;
72 read_permissions.push_back( 72 read_permissions.push_back(
73 extensions::MediaGalleriesPermission::kReadPermission); 73 extensions::MediaGalleriesPermission::kReadPermission);
74 extension_ = AddMediaGalleriesApp("read", read_permissions, profile_.get()); 74 extension_ = AddMediaGalleriesApp("read", read_permissions, profile_.get());
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 gallery.volume_label = base::string16(); 297 gallery.volume_label = base::string16();
298 EXPECT_EQ("vendor, model", GalleryName(gallery)); 298 EXPECT_EQ("vendor, model", GalleryName(gallery));
299 299
300 gallery.total_size_in_bytes = 1000000; 300 gallery.total_size_in_bytes = 1000000;
301 EXPECT_EQ("977 KB vendor, model", GalleryName(gallery)); 301 EXPECT_EQ("977 KB vendor, model", GalleryName(gallery));
302 302
303 gallery.path = base::FilePath(FILE_PATH_LITERAL("sub/path")); 303 gallery.path = base::FilePath(FILE_PATH_LITERAL("sub/path"));
304 EXPECT_EQ("path - 977 KB vendor, model", GalleryName(gallery)); 304 EXPECT_EQ("path - 977 KB vendor, model", GalleryName(gallery));
305 } 305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698