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

Side by Side Diff: chrome/browser/ui/ash/chrome_launcher_prefs.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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/ui/ash/chrome_launcher_prefs.h" 5 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory>
10
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/values.h" 12 #include "base/values.h"
12 #include "chrome/common/extensions/extension_constants.h" 13 #include "chrome/common/extensions/extension_constants.h"
13 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
14 #include "components/pref_registry/pref_registry_syncable.h" 15 #include "components/pref_registry/pref_registry_syncable.h"
15 16
16 namespace { 17 namespace {
17 18
18 // App ID of default pinned apps. 19 // App ID of default pinned apps.
19 const char* kDefaultPinnedApps[] = { 20 const char* kDefaultPinnedApps[] = {
20 extension_misc::kGmailAppId, 21 extension_misc::kGmailAppId,
21 extension_misc::kGoogleDocAppId, 22 extension_misc::kGoogleDocAppId,
22 extension_misc::kYoutubeAppId, 23 extension_misc::kYoutubeAppId,
23 }; 24 };
24 25
25 base::ListValue* CreateDefaultPinnedAppsList() { 26 base::ListValue* CreateDefaultPinnedAppsList() {
26 scoped_ptr<base::ListValue> apps(new base::ListValue); 27 std::unique_ptr<base::ListValue> apps(new base::ListValue);
27 for (size_t i = 0; i < arraysize(kDefaultPinnedApps); ++i) 28 for (size_t i = 0; i < arraysize(kDefaultPinnedApps); ++i)
28 apps->Append(ash::CreateAppDict(kDefaultPinnedApps[i])); 29 apps->Append(ash::CreateAppDict(kDefaultPinnedApps[i]));
29 30
30 return apps.release(); 31 return apps.release();
31 } 32 }
32 33
33 } // namespace 34 } // namespace
34 35
35 namespace ash { 36 namespace ash {
36 37
(...skipping 27 matching lines...) Expand all
64 registry->RegisterStringPref(prefs::kShelfAlignment, 65 registry->RegisterStringPref(prefs::kShelfAlignment,
65 kShelfAlignmentBottom, 66 kShelfAlignmentBottom,
66 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 67 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
67 registry->RegisterStringPref(prefs::kShelfAlignmentLocal, std::string()); 68 registry->RegisterStringPref(prefs::kShelfAlignmentLocal, std::string());
68 registry->RegisterDictionaryPref(prefs::kShelfPreferences); 69 registry->RegisterDictionaryPref(prefs::kShelfPreferences);
69 registry->RegisterIntegerPref(prefs::kLogoutDialogDurationMs, 20000); 70 registry->RegisterIntegerPref(prefs::kLogoutDialogDurationMs, 20000);
70 registry->RegisterBooleanPref(prefs::kShowLogoutButtonInTray, false); 71 registry->RegisterBooleanPref(prefs::kShowLogoutButtonInTray, false);
71 } 72 }
72 73
73 base::DictionaryValue* CreateAppDict(const std::string& app_id) { 74 base::DictionaryValue* CreateAppDict(const std::string& app_id) {
74 scoped_ptr<base::DictionaryValue> app_value(new base::DictionaryValue); 75 std::unique_ptr<base::DictionaryValue> app_value(new base::DictionaryValue);
75 app_value->SetString(kPinnedAppsPrefAppIDPath, app_id); 76 app_value->SetString(kPinnedAppsPrefAppIDPath, app_id);
76 return app_value.release(); 77 return app_value.release();
77 } 78 }
78 79
79 } // namespace ash 80 } // namespace ash
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_keyboard_ui.cc ('k') | chrome/browser/ui/ash/chrome_new_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698