| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/session_startup_pref.h" | 5 #include "chrome/browser/prefs/session_startup_pref.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/defaults.h" | 11 #include "chrome/browser/defaults.h" |
| 12 #include "chrome/browser/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
| 13 #include "chrome/browser/prefs/scoped_pref_update.h" |
| 13 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profile.h" |
| 14 #include "chrome/browser/scoped_pref_update.h" | |
| 15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // For historical reasons the enum and value registered in the prefs don't line | 19 // For historical reasons the enum and value registered in the prefs don't line |
| 20 // up. These are the values registered in prefs. | 20 // up. These are the values registered in prefs. |
| 21 const int kPrefValueDefault = 0; | 21 const int kPrefValueDefault = 0; |
| 22 const int kPrefValueLast = 1; | 22 const int kPrefValueLast = 1; |
| 23 const int kPrefValueURLs = 4; | 23 const int kPrefValueURLs = 4; |
| 24 | 24 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 Value* value = NULL; | 98 Value* value = NULL; |
| 99 if (url_pref_list->Get(i, &value)) { | 99 if (url_pref_list->Get(i, &value)) { |
| 100 std::string url_text; | 100 std::string url_text; |
| 101 if (value->GetAsString(&url_text)) | 101 if (value->GetAsString(&url_text)) |
| 102 pref.urls.push_back(GURL(url_text)); | 102 pref.urls.push_back(GURL(url_text)); |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 return pref; | 106 return pref; |
| 107 } | 107 } |
| OLD | NEW |