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

Side by Side Diff: chrome/browser/prefs/pref_service_browsertest.cc

Issue 18332014: Move Copy* into the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows Created 7 years, 5 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 reference_pref_file = ui_test_utils::GetTestFilePath( 73 reference_pref_file = ui_test_utils::GetTestFilePath(
74 base::FilePath().AppendASCII("profiles"). 74 base::FilePath().AppendASCII("profiles").
75 AppendASCII("window_placement"), 75 AppendASCII("window_placement"),
76 base::FilePath().Append(chrome::kLocalStateFilename)); 76 base::FilePath().Append(chrome::kLocalStateFilename));
77 tmp_pref_file_ = user_data_directory.Append(chrome::kLocalStateFilename); 77 tmp_pref_file_ = user_data_directory.Append(chrome::kLocalStateFilename);
78 } 78 }
79 79
80 CHECK(file_util::PathExists(reference_pref_file)); 80 CHECK(file_util::PathExists(reference_pref_file));
81 // Copy only the Preferences file if |new_profile_|, or Local State if not, 81 // Copy only the Preferences file if |new_profile_|, or Local State if not,
82 // and the rest will be automatically created. 82 // and the rest will be automatically created.
83 CHECK(file_util::CopyFile(reference_pref_file, tmp_pref_file_)); 83 CHECK(base::CopyFile(reference_pref_file, tmp_pref_file_));
84 84
85 #if defined(OS_WIN) 85 #if defined(OS_WIN)
86 // Make the copy writable. On POSIX we assume the umask allows files 86 // Make the copy writable. On POSIX we assume the umask allows files
87 // we create to be writable. 87 // we create to be writable.
88 CHECK(::SetFileAttributesW(tmp_pref_file_.value().c_str(), 88 CHECK(::SetFileAttributesW(tmp_pref_file_.value().c_str(),
89 FILE_ATTRIBUTE_NORMAL)); 89 FILE_ATTRIBUTE_NORMAL));
90 #endif 90 #endif
91 return true; 91 return true;
92 } 92 }
93 93
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 EXPECT_EQ(right, bounds.x() + bounds.width()); 206 EXPECT_EQ(right, bounds.x() + bounds.width());
207 207
208 // Find if launched window is maximized. 208 // Find if launched window is maximized.
209 bool is_window_maximized = browser()->window()->IsMaximized(); 209 bool is_window_maximized = browser()->window()->IsMaximized();
210 bool is_maximized = false; 210 bool is_maximized = false;
211 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized", 211 EXPECT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + ".maximized",
212 &is_maximized)); 212 &is_maximized));
213 EXPECT_EQ(is_maximized, is_window_maximized); 213 EXPECT_EQ(is_maximized, is_window_maximized);
214 } 214 }
215 #endif 215 #endif
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_unittest.cc ('k') | chrome/browser/printing/printing_layout_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698