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

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

Issue 176843022: Move UTF16ToASCII, remove WideToASCII. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 15 matching lines...) Expand all
26 #include "chrome/browser/chromeos/settings/device_settings_service.h" 26 #include "chrome/browser/chromeos/settings/device_settings_service.h"
27 #endif 27 #endif
28 28
29 using storage_monitor::StorageInfo; 29 using storage_monitor::StorageInfo;
30 using storage_monitor::TestStorageMonitor; 30 using storage_monitor::TestStorageMonitor;
31 31
32 namespace { 32 namespace {
33 33
34 std::string GalleryName(const MediaGalleryPrefInfo& gallery) { 34 std::string GalleryName(const MediaGalleryPrefInfo& gallery) {
35 base::string16 name = gallery.GetGalleryDisplayName(); 35 base::string16 name = gallery.GetGalleryDisplayName();
36 return UTF16ToASCII(name); 36 return base::UTF16ToASCII(name);
37 } 37 }
38 38
39 class MockMediaGalleriesDialog 39 class MockMediaGalleriesDialog
40 : public MediaGalleriesDialog { 40 : public MediaGalleriesDialog {
41 public: 41 public:
42 typedef base::Callback<void(int update_count)> DialogDestroyedCallback; 42 typedef base::Callback<void(int update_count)> DialogDestroyedCallback;
43 43
44 explicit MockMediaGalleriesDialog(const DialogDestroyedCallback& callback) 44 explicit MockMediaGalleriesDialog(const DialogDestroyedCallback& callback)
45 : update_count_(0), 45 : update_count_(0),
46 dialog_destroyed_callback_(callback) { 46 dialog_destroyed_callback_(callback) {
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 gallery.volume_label = base::string16(); 306 gallery.volume_label = base::string16();
307 EXPECT_EQ("vendor, model", GalleryName(gallery)); 307 EXPECT_EQ("vendor, model", GalleryName(gallery));
308 308
309 gallery.total_size_in_bytes = 1000000; 309 gallery.total_size_in_bytes = 1000000;
310 EXPECT_EQ("977 KB vendor, model", GalleryName(gallery)); 310 EXPECT_EQ("977 KB vendor, model", GalleryName(gallery));
311 311
312 gallery.path = base::FilePath(FILE_PATH_LITERAL("sub/path")); 312 gallery.path = base::FilePath(FILE_PATH_LITERAL("sub/path"));
313 EXPECT_EQ("path - 977 KB vendor, model", GalleryName(gallery)); 313 EXPECT_EQ("path - 977 KB vendor, model", GalleryName(gallery));
314 } 314 }
OLDNEW
« no previous file with comments | « chrome/browser/google/google_util.cc ('k') | chrome/browser/parsers/metadata_parser_filebase_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698