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

Side by Side Diff: chrome/browser/profile_resetter/resettable_settings_snapshot.cc

Issue 102103005: Move c/c/e/extension_set to top-level extensions/ (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move ExtensionSet to extensions namespace Created 7 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/profile_resetter/resettable_settings_snapshot.h" 5 #include "chrome/browser/profile_resetter/resettable_settings_snapshot.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 TemplateURLService* service = 58 TemplateURLService* service =
59 TemplateURLServiceFactory::GetForProfile(profile); 59 TemplateURLServiceFactory::GetForProfile(profile);
60 DCHECK(service); 60 DCHECK(service);
61 TemplateURL* dse = service->GetDefaultSearchProvider(); 61 TemplateURL* dse = service->GetDefaultSearchProvider();
62 if (dse) 62 if (dse)
63 dse_url_ = dse->url(); 63 dse_url_ = dse->url();
64 64
65 ExtensionService* extension_service = profile->GetExtensionService(); 65 ExtensionService* extension_service = profile->GetExtensionService();
66 DCHECK(extension_service); 66 DCHECK(extension_service);
67 const ExtensionSet* enabled_ext = extension_service->extensions(); 67 const extensions::ExtensionSet* enabled_ext = extension_service->extensions();
68 enabled_extensions_.reserve(enabled_ext->size()); 68 enabled_extensions_.reserve(enabled_ext->size());
69 69
70 for (ExtensionSet::const_iterator it = enabled_ext->begin(); 70 for (extensions::ExtensionSet::const_iterator it = enabled_ext->begin();
71 it != enabled_ext->end(); ++it) 71 it != enabled_ext->end(); ++it)
72 enabled_extensions_.push_back(std::make_pair((*it)->id(), (*it)->name())); 72 enabled_extensions_.push_back(std::make_pair((*it)->id(), (*it)->name()));
73 73
74 // ExtensionSet is sorted but it seems to be an implementation detail. 74 // ExtensionSet is sorted but it seems to be an implementation detail.
75 std::sort(enabled_extensions_.begin(), enabled_extensions_.end()); 75 std::sort(enabled_extensions_.begin(), enabled_extensions_.end());
76 } 76 }
77 77
78 ResettableSettingsSnapshot::~ResettableSettingsSnapshot() {} 78 ResettableSettingsSnapshot::~ResettableSettingsSnapshot() {}
79 79
80 void ResettableSettingsSnapshot::Subtract( 80 void ResettableSettingsSnapshot::Subtract(
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 (extension_names += i->second) += '\n'; 257 (extension_names += i->second) += '\n';
258 } 258 }
259 if (!extension_names.empty()) { 259 if (!extension_names.empty()) {
260 extension_names.erase(extension_names.end() - 1); 260 extension_names.erase(extension_names.end() - 1);
261 AddPair(list, 261 AddPair(list,
262 l10n_util::GetStringUTF16(IDS_RESET_PROFILE_SETTINGS_EXTENSIONS), 262 l10n_util::GetStringUTF16(IDS_RESET_PROFILE_SETTINGS_EXTENSIONS),
263 extension_names); 263 extension_names);
264 } 264 }
265 return list; 265 return list;
266 } 266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698