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

Side by Side Diff: chrome/browser/extensions/extension_prefs.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 | 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/extensions/extension_prefs.h" 5 #include "chrome/browser/extensions/extension_prefs.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_notifier.h" 8 #include "base/prefs/pref_notifier.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1663 DictionaryValue* extension_dict = new DictionaryValue(); 1663 DictionaryValue* extension_dict = new DictionaryValue();
1664 PopulateExtensionInfoPrefs(extension, time_provider_->GetCurrentTime(), 1664 PopulateExtensionInfoPrefs(extension, time_provider_->GetCurrentTime(),
1665 initial_state, extension_dict); 1665 initial_state, extension_dict);
1666 1666
1667 // Add transient data that is needed by FinishDelayedInstallInfo(), but 1667 // Add transient data that is needed by FinishDelayedInstallInfo(), but
1668 // should not be in the final extension prefs. All entries here should have 1668 // should not be in the final extension prefs. All entries here should have
1669 // a corresponding Remove() call in FinishDelayedInstallInfo(). 1669 // a corresponding Remove() call in FinishDelayedInstallInfo().
1670 if (extension->RequiresSortOrdinal()) { 1670 if (extension->RequiresSortOrdinal()) {
1671 extension_dict->SetString( 1671 extension_dict->SetString(
1672 kPrefSuggestedPageOrdinal, 1672 kPrefSuggestedPageOrdinal,
1673 page_ordinal.IsValid() ? page_ordinal.ToInternalValue() : ""); 1673 page_ordinal.IsValid() ? page_ordinal.ToInternalValue()
1674 : std::string());
1674 } 1675 }
1675 1676
1676 UpdateExtensionPref(extension->id(), kDelayedInstallInfo, extension_dict); 1677 UpdateExtensionPref(extension->id(), kDelayedInstallInfo, extension_dict);
1677 } 1678 }
1678 1679
1679 bool ExtensionPrefs::RemoveDelayedInstallInfo( 1680 bool ExtensionPrefs::RemoveDelayedInstallInfo(
1680 const std::string& extension_id) { 1681 const std::string& extension_id) {
1681 if (!GetExtensionPref(extension_id)) 1682 if (!GetExtensionPref(extension_id))
1682 return false; 1683 return false;
1683 ScopedExtensionPrefUpdate update(prefs_, extension_id); 1684 ScopedExtensionPrefUpdate update(prefs_, extension_id);
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
2359 is_enabled = initial_state == Extension::ENABLED; 2360 is_enabled = initial_state == Extension::ENABLED;
2360 } 2361 }
2361 2362
2362 extension_pref_value_map_->RegisterExtension(extension_id, install_time, 2363 extension_pref_value_map_->RegisterExtension(extension_id, install_time,
2363 is_enabled); 2364 is_enabled);
2364 content_settings_store_->RegisterExtension(extension_id, install_time, 2365 content_settings_store_->RegisterExtension(extension_id, install_time,
2365 is_enabled); 2366 is_enabled);
2366 } 2367 }
2367 2368
2368 } // namespace extensions 2369 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_pref_value_map_unittest.cc ('k') | chrome/browser/extensions/extension_process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698