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

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

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 const std::string& extension_id) { 1544 const std::string& extension_id) {
1545 const DictionaryValue* dict = GetExtensionPref(extension_id); 1545 const DictionaryValue* dict = GetExtensionPref(extension_id);
1546 if (!dict) 1546 if (!dict)
1547 return base::FilePath(); 1547 return base::FilePath();
1548 1548
1549 std::string path; 1549 std::string path;
1550 if (!dict->GetString(kPrefPath, &path)) 1550 if (!dict->GetString(kPrefPath, &path))
1551 return base::FilePath(); 1551 return base::FilePath();
1552 1552
1553 return install_directory_.Append( 1553 return install_directory_.Append(
1554 base::FilePath::FromWStringHack(UTF8ToWide(path))); 1554 base::FilePath::FromWStringHack(base::UTF8ToWide(path)));
1555 } 1555 }
1556 1556
1557 void ExtensionPrefs::UpdateExtensionPref(const std::string& extension_id, 1557 void ExtensionPrefs::UpdateExtensionPref(const std::string& extension_id,
1558 const std::string& key, 1558 const std::string& key,
1559 Value* data_value) { 1559 Value* data_value) {
1560 if (!Extension::IdIsValid(extension_id)) { 1560 if (!Extension::IdIsValid(extension_id)) {
1561 NOTREACHED() << "Invalid extension_id " << extension_id; 1561 NOTREACHED() << "Invalid extension_id " << extension_id;
1562 return; 1562 return;
1563 } 1563 }
1564 ScopedExtensionPrefUpdate update(prefs_, extension_id); 1564 ScopedExtensionPrefUpdate update(prefs_, extension_id);
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 is_enabled = initial_state == Extension::ENABLED; 2370 is_enabled = initial_state == Extension::ENABLED;
2371 } 2371 }
2372 2372
2373 extension_pref_value_map_->RegisterExtension(extension_id, install_time, 2373 extension_pref_value_map_->RegisterExtension(extension_id, install_time,
2374 is_enabled); 2374 is_enabled);
2375 content_settings_store_->RegisterExtension(extension_id, install_time, 2375 content_settings_store_->RegisterExtension(extension_id, install_time,
2376 is_enabled); 2376 is_enabled);
2377 } 2377 }
2378 2378
2379 } // namespace extensions 2379 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/browser_action_apitest.cc ('k') | chrome/browser/extensions/external_pref_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698